diff --git a/README.md b/README.md index fc1006eb5ab..3b2c43bd442 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ 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.28.0') +implementation platform('com.google.cloud:libraries-bom:26.29.0') implementation 'com.google.cloud:google-cloud-spanner' ``` diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml index f9325e8f49d..eab274a3a6f 100644 --- a/google-cloud-spanner-executor/pom.xml +++ b/google-cloud-spanner-executor/pom.xml @@ -34,6 +34,10 @@ io.grpc grpc-netty-shaded + + io.grpc + grpc-protobuf + io.grpc grpc-stub @@ -129,6 +133,28 @@ commons-io 2.15.1 + + + + junit + junit + test + + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + google-spanner-cloud-executor @@ -162,5 +188,16 @@ 3.1.2 + + + + org.apache.maven.plugins + maven-dependency-plugin + + com.google.api:gax + + + + diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxyClient.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxyClient.java new file mode 100644 index 00000000000..2bbfdbc89dd --- /dev/null +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxyClient.java @@ -0,0 +1,235 @@ +/* + * 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. + */ + +package com.google.cloud.spanner.executor.v1; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.cloud.spanner.executor.v1.stub.SpannerExecutorProxyStub; +import com.google.cloud.spanner.executor.v1.stub.SpannerExecutorProxyStubSettings; +import com.google.spanner.executor.v1.SpannerAsyncActionRequest; +import com.google.spanner.executor.v1.SpannerAsyncActionResponse; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service that executes SpannerActions asynchronously. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@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 (SpannerExecutorProxyClient spannerExecutorProxyClient =
+ *     SpannerExecutorProxyClient.create()) {
+ *   BidiStream bidiStream =
+ *       spannerExecutorProxyClient.executeActionAsyncCallable().call();
+ *   SpannerAsyncActionRequest request =
+ *       SpannerAsyncActionRequest.newBuilder()
+ *           .setActionId(198295492)
+ *           .setAction(SpannerAction.newBuilder().build())
+ *           .build();
+ *   bidiStream.send(request);
+ *   for (SpannerAsyncActionResponse response : bidiStream) {
+ *     // Do something when a response is received.
+ *   }
+ * }
+ * }
+ * + *

Note: close() needs to be called on the SpannerExecutorProxyClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of SpannerExecutorProxySettings + * to create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * SpannerExecutorProxySettings spannerExecutorProxySettings =
+ *     SpannerExecutorProxySettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * SpannerExecutorProxyClient spannerExecutorProxyClient =
+ *     SpannerExecutorProxyClient.create(spannerExecutorProxySettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * SpannerExecutorProxySettings spannerExecutorProxySettings =
+ *     SpannerExecutorProxySettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SpannerExecutorProxyClient spannerExecutorProxyClient =
+ *     SpannerExecutorProxyClient.create(spannerExecutorProxySettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class SpannerExecutorProxyClient implements BackgroundResource { + private final SpannerExecutorProxySettings settings; + private final SpannerExecutorProxyStub stub; + + /** Constructs an instance of SpannerExecutorProxyClient with default settings. */ + public static final SpannerExecutorProxyClient create() throws IOException { + return create(SpannerExecutorProxySettings.newBuilder().build()); + } + + /** + * Constructs an instance of SpannerExecutorProxyClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final SpannerExecutorProxyClient create(SpannerExecutorProxySettings settings) + throws IOException { + return new SpannerExecutorProxyClient(settings); + } + + /** + * Constructs an instance of SpannerExecutorProxyClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(SpannerExecutorProxySettings). + */ + public static final SpannerExecutorProxyClient create(SpannerExecutorProxyStub stub) { + return new SpannerExecutorProxyClient(stub); + } + + /** + * Constructs an instance of SpannerExecutorProxyClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected SpannerExecutorProxyClient(SpannerExecutorProxySettings settings) throws IOException { + this.settings = settings; + this.stub = ((SpannerExecutorProxyStubSettings) settings.getStubSettings()).createStub(); + } + + protected SpannerExecutorProxyClient(SpannerExecutorProxyStub stub) { + this.settings = null; + this.stub = stub; + } + + public final SpannerExecutorProxySettings getSettings() { + return settings; + } + + public SpannerExecutorProxyStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ExecuteActionAsync is a streaming call that starts executing a new Spanner action. + * + *

For each request, the server will reply with one or more responses, but only the last + * response will contain status in the outcome. + * + *

Responses can be matched to requests by action_id. It is allowed to have multiple actions in + * flight--in that case, actions are be executed in parallel. + * + *

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 (SpannerExecutorProxyClient spannerExecutorProxyClient =
+   *     SpannerExecutorProxyClient.create()) {
+   *   BidiStream bidiStream =
+   *       spannerExecutorProxyClient.executeActionAsyncCallable().call();
+   *   SpannerAsyncActionRequest request =
+   *       SpannerAsyncActionRequest.newBuilder()
+   *           .setActionId(198295492)
+   *           .setAction(SpannerAction.newBuilder().build())
+   *           .build();
+   *   bidiStream.send(request);
+   *   for (SpannerAsyncActionResponse response : bidiStream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final BidiStreamingCallable + executeActionAsyncCallable() { + return stub.executeActionAsyncCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxySettings.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxySettings.java new file mode 100644 index 00000000000..efcd8b16d41 --- /dev/null +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxySettings.java @@ -0,0 +1,194 @@ +/* + * 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. + */ + +package com.google.cloud.spanner.executor.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.spanner.executor.v1.stub.SpannerExecutorProxyStubSettings; +import com.google.spanner.executor.v1.SpannerAsyncActionRequest; +import com.google.spanner.executor.v1.SpannerAsyncActionResponse; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SpannerExecutorProxyClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of executeActionAsync to 30 seconds: + * + *

{@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
+ * SpannerExecutorProxySettings.Builder spannerExecutorProxySettingsBuilder =
+ *     SpannerExecutorProxySettings.newBuilder();
+ * spannerExecutorProxySettingsBuilder
+ *     .executeActionAsyncSettings()
+ *     .setRetrySettings(
+ *         spannerExecutorProxySettingsBuilder
+ *             .executeActionAsyncSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SpannerExecutorProxySettings spannerExecutorProxySettings =
+ *     spannerExecutorProxySettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class SpannerExecutorProxySettings extends ClientSettings { + + /** Returns the object with the settings used for calls to executeActionAsync. */ + public StreamingCallSettings + executeActionAsyncSettings() { + return ((SpannerExecutorProxyStubSettings) getStubSettings()).executeActionAsyncSettings(); + } + + public static final SpannerExecutorProxySettings create(SpannerExecutorProxyStubSettings stub) + throws IOException { + return new SpannerExecutorProxySettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return SpannerExecutorProxyStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return SpannerExecutorProxyStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return SpannerExecutorProxyStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return SpannerExecutorProxyStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return SpannerExecutorProxyStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return SpannerExecutorProxyStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SpannerExecutorProxyStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected SpannerExecutorProxySettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for SpannerExecutorProxySettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(SpannerExecutorProxyStubSettings.newBuilder(clientContext)); + } + + protected Builder(SpannerExecutorProxySettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(SpannerExecutorProxyStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(SpannerExecutorProxyStubSettings.newBuilder()); + } + + public SpannerExecutorProxyStubSettings.Builder getStubSettingsBuilder() { + return ((SpannerExecutorProxyStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to executeActionAsync. */ + public StreamingCallSettings.Builder + executeActionAsyncSettings() { + return getStubSettingsBuilder().executeActionAsyncSettings(); + } + + @Override + public SpannerExecutorProxySettings build() throws IOException { + return new SpannerExecutorProxySettings(this); + } + } +} diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/gapic_metadata.json b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/gapic_metadata.json new file mode 100644 index 00000000000..91e72f27e57 --- /dev/null +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/gapic_metadata.json @@ -0,0 +1,21 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.spanner.executor.v1", + "libraryPackage": "com.google.cloud.spanner.executor.v1", + "services": { + "SpannerExecutorProxy": { + "clients": { + "grpc": { + "libraryClient": "SpannerExecutorProxyClient", + "rpcs": { + "ExecuteActionAsync": { + "methods": ["executeActionAsyncCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/package-info.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/package-info.java new file mode 100644 index 00000000000..20f0308977e --- /dev/null +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/package-info.java @@ -0,0 +1,53 @@ +/* + * 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. + */ + +/** + * A client to Cloud Spanner Executor test API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= SpannerExecutorProxyClient ======================= + * + *

Service Description: Service that executes SpannerActions asynchronously. + * + *

Sample for SpannerExecutorProxyClient: + * + *

{@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 (SpannerExecutorProxyClient spannerExecutorProxyClient =
+ *     SpannerExecutorProxyClient.create()) {
+ *   BidiStream bidiStream =
+ *       spannerExecutorProxyClient.executeActionAsyncCallable().call();
+ *   SpannerAsyncActionRequest request =
+ *       SpannerAsyncActionRequest.newBuilder()
+ *           .setActionId(198295492)
+ *           .setAction(SpannerAction.newBuilder().build())
+ *           .build();
+ *   bidiStream.send(request);
+ *   for (SpannerAsyncActionResponse response : bidiStream) {
+ *     // Do something when a response is received.
+ *   }
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.spanner.executor.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/GrpcSpannerExecutorProxyCallableFactory.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/GrpcSpannerExecutorProxyCallableFactory.java new file mode 100644 index 00000000000..e890b9d400d --- /dev/null +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/GrpcSpannerExecutorProxyCallableFactory.java @@ -0,0 +1,113 @@ +/* + * 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. + */ + +package com.google.cloud.spanner.executor.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the SpannerExecutorProxy service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcSpannerExecutorProxyCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/GrpcSpannerExecutorProxyStub.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/GrpcSpannerExecutorProxyStub.java new file mode 100644 index 00000000000..fe462bbf539 --- /dev/null +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/GrpcSpannerExecutorProxyStub.java @@ -0,0 +1,162 @@ +/* + * 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. + */ + +package com.google.cloud.spanner.executor.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.spanner.executor.v1.SpannerAsyncActionRequest; +import com.google.spanner.executor.v1.SpannerAsyncActionResponse; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the SpannerExecutorProxy service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcSpannerExecutorProxyStub extends SpannerExecutorProxyStub { + private static final MethodDescriptor + executeActionAsyncMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName( + "google.spanner.executor.v1.SpannerExecutorProxy/ExecuteActionAsync") + .setRequestMarshaller( + ProtoUtils.marshaller(SpannerAsyncActionRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SpannerAsyncActionResponse.getDefaultInstance())) + .build(); + + private final BidiStreamingCallable + executeActionAsyncCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcSpannerExecutorProxyStub create(SpannerExecutorProxyStubSettings settings) + throws IOException { + return new GrpcSpannerExecutorProxyStub(settings, ClientContext.create(settings)); + } + + public static final GrpcSpannerExecutorProxyStub create(ClientContext clientContext) + throws IOException { + return new GrpcSpannerExecutorProxyStub( + SpannerExecutorProxyStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcSpannerExecutorProxyStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcSpannerExecutorProxyStub( + SpannerExecutorProxyStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcSpannerExecutorProxyStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcSpannerExecutorProxyStub( + SpannerExecutorProxyStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcSpannerExecutorProxyCallableFactory()); + } + + /** + * Constructs an instance of GrpcSpannerExecutorProxyStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcSpannerExecutorProxyStub( + SpannerExecutorProxyStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + executeActionAsyncTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(executeActionAsyncMethodDescriptor) + .build(); + + this.executeActionAsyncCallable = + callableFactory.createBidiStreamingCallable( + executeActionAsyncTransportSettings, + settings.executeActionAsyncSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public BidiStreamingCallable + executeActionAsyncCallable() { + return executeActionAsyncCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStub.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStub.java new file mode 100644 index 00000000000..d3823b1f67d --- /dev/null +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStub.java @@ -0,0 +1,41 @@ +/* + * 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. + */ + +package com.google.cloud.spanner.executor.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.spanner.executor.v1.SpannerAsyncActionRequest; +import com.google.spanner.executor.v1.SpannerAsyncActionResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the SpannerExecutorProxy service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class SpannerExecutorProxyStub implements BackgroundResource { + + public BidiStreamingCallable + executeActionAsyncCallable() { + throw new UnsupportedOperationException("Not implemented: executeActionAsyncCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStubSettings.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStubSettings.java new file mode 100644 index 00000000000..126106a5b69 --- /dev/null +++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStubSettings.java @@ -0,0 +1,269 @@ +/* + * 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. + */ + +package com.google.cloud.spanner.executor.v1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.spanner.executor.v1.SpannerAsyncActionRequest; +import com.google.spanner.executor.v1.SpannerAsyncActionResponse; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SpannerExecutorProxyStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (spanner-cloud-executor.googleapis.com) and default port (443) + * are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of executeActionAsync to 30 seconds: + * + *

{@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
+ * SpannerExecutorProxyStubSettings.Builder spannerExecutorProxySettingsBuilder =
+ *     SpannerExecutorProxyStubSettings.newBuilder();
+ * spannerExecutorProxySettingsBuilder
+ *     .executeActionAsyncSettings()
+ *     .setRetrySettings(
+ *         spannerExecutorProxySettingsBuilder
+ *             .executeActionAsyncSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SpannerExecutorProxyStubSettings spannerExecutorProxySettings =
+ *     spannerExecutorProxySettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class SpannerExecutorProxyStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().build(); + + private final StreamingCallSettings + executeActionAsyncSettings; + + /** Returns the object with the settings used for calls to executeActionAsync. */ + public StreamingCallSettings + executeActionAsyncSettings() { + return executeActionAsyncSettings; + } + + public SpannerExecutorProxyStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcSpannerExecutorProxyStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "spanner-cloud-executor.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "spanner-cloud-executor.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(SpannerExecutorProxyStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected SpannerExecutorProxyStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + executeActionAsyncSettings = settingsBuilder.executeActionAsyncSettings().build(); + } + + /** Builder for SpannerExecutorProxyStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final StreamingCallSettings.Builder< + SpannerAsyncActionRequest, SpannerAsyncActionResponse> + executeActionAsyncSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + executeActionAsyncSettings = StreamingCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = ImmutableList.>of(); + initDefaults(this); + } + + protected Builder(SpannerExecutorProxyStubSettings settings) { + super(settings); + + executeActionAsyncSettings = settings.executeActionAsyncSettings.toBuilder(); + + unaryMethodSettingsBuilders = ImmutableList.>of(); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to executeActionAsync. */ + public StreamingCallSettings.Builder + executeActionAsyncSettings() { + return executeActionAsyncSettings; + } + + @Override + public SpannerExecutorProxyStubSettings build() throws IOException { + return new SpannerExecutorProxyStubSettings(this); + } + } +} diff --git a/google-cloud-spanner-executor/src/main/resources/META-INF/native-image/com.google.cloud.spanner.executor.v1/reflect-config.json b/google-cloud-spanner-executor/src/main/resources/META-INF/native-image/com.google.cloud.spanner.executor.v1/reflect-config.json new file mode 100644 index 00000000000..0cd72e33eae --- /dev/null +++ b/google-cloud-spanner-executor/src/main/resources/META-INF/native-image/com.google.cloud.spanner.executor.v1/reflect-config.json @@ -0,0 +1,5303 @@ +[ + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig$LogType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Binding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Binding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.NullValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.Backup", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.Backup$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.Backup$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.BackupInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.BackupInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CopyBackupEncryptionConfig$EncryptionType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CopyBackupMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CopyBackupMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CopyBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CopyBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CreateBackupEncryptionConfig$EncryptionType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CreateBackupMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CreateBackupMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CreateBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CreateBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CreateDatabaseMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CreateDatabaseMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CreateDatabaseRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.CreateDatabaseRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.Database", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.Database$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.Database$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.DatabaseDialect", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.DatabaseRole", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.DatabaseRole$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.DdlStatementActionInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.DdlStatementActionInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.DeleteBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.DeleteBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.DropDatabaseRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.DropDatabaseRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.EncryptionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.EncryptionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.EncryptionInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.EncryptionInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.EncryptionInfo$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.GetBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.GetBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.GetDatabaseDdlRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.GetDatabaseDdlRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.GetDatabaseDdlResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.GetDatabaseDdlResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.GetDatabaseRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.GetDatabaseRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListBackupOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListBackupOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListBackupOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListBackupOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListBackupsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListBackupsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListBackupsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListBackupsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListDatabaseOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListDatabaseOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListDatabaseOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListDatabaseOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListDatabaseRolesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListDatabaseRolesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListDatabaseRolesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListDatabaseRolesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListDatabasesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListDatabasesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListDatabasesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.ListDatabasesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.OperationProgress", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.OperationProgress$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig$EncryptionType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.RestoreDatabaseMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.RestoreDatabaseMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.RestoreDatabaseRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.RestoreDatabaseRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.RestoreInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.RestoreInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.RestoreSourceType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.UpdateBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.UpdateBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.UpdateDatabaseMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.UpdateDatabaseMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.UpdateDatabaseRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.database.v1.UpdateDatabaseRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AutoscalingLimits", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AutoscalingLimits$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AutoscalingTargets", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AutoscalingTargets$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstanceMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstanceMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.CreateInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.DeleteInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.DeleteInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.GetInstanceConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.GetInstanceConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.GetInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.GetInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.Instance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.Instance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.Instance$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.InstanceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.InstanceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.InstanceConfig$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.InstanceConfig$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstanceConfigsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ListInstancesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.OperationProgress", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.OperationProgress$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ReplicaInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ReplicaInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ReplicaInfo$ReplicaType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstanceMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstanceMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.UpdateInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.AdminAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.AdminAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.AdminResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.AdminResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.BatchDmlAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.BatchDmlAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.BatchPartition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.BatchPartition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CancelOperationAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CancelOperationAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ChangeStreamRecord", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ChangeStreamRecord$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ChildPartitionsRecord", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ChildPartitionsRecord$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ChildPartitionsRecord$ChildPartition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ChildPartitionsRecord$ChildPartition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CloseBatchTransactionAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CloseBatchTransactionAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CloudBackupResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CloudBackupResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CloudDatabaseResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CloudDatabaseResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CloudInstanceConfigResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CloudInstanceConfigResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CloudInstanceResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CloudInstanceResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ColumnMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ColumnMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.Concurrency", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.Concurrency$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CopyCloudBackupAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CopyCloudBackupAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CreateCloudBackupAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CreateCloudBackupAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CreateCloudDatabaseAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CreateCloudDatabaseAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CreateCloudInstanceAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CreateCloudInstanceAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CreateUserInstanceConfigAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.CreateUserInstanceConfigAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DataChangeRecord", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DataChangeRecord$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DataChangeRecord$ColumnType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DataChangeRecord$ColumnType$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DataChangeRecord$Mod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DataChangeRecord$Mod$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DeleteCloudBackupAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DeleteCloudBackupAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DeleteCloudInstanceAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DeleteCloudInstanceAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DeleteUserInstanceConfigAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DeleteUserInstanceConfigAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DmlAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DmlAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DropCloudDatabaseAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.DropCloudDatabaseAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ExecuteChangeStreamQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ExecuteChangeStreamQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ExecutePartitionAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ExecutePartitionAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.FinishTransactionAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.FinishTransactionAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.FinishTransactionAction$Mode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GetCloudBackupAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GetCloudBackupAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GetCloudDatabaseAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GetCloudDatabaseAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GetCloudInstanceAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GetCloudInstanceAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GetCloudInstanceConfigAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GetCloudInstanceConfigAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GetOperationAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.GetOperationAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.HeartbeatRecord", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.HeartbeatRecord$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.KeyRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.KeyRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.KeyRange$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.KeySet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.KeySet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ListCloudBackupOperationsAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ListCloudBackupOperationsAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ListCloudBackupsAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ListCloudBackupsAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ListCloudDatabasesAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ListCloudDatabasesAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ListCloudInstanceConfigsAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ListCloudInstanceConfigsAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ListCloudInstancesAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ListCloudInstancesAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.MutationAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.MutationAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.MutationAction$InsertArgs", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.MutationAction$InsertArgs$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.MutationAction$Mod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.MutationAction$Mod$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.MutationAction$UpdateArgs", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.MutationAction$UpdateArgs$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.OperationResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.OperationResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.PartitionedUpdateAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.PartitionedUpdateAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.PartitionedUpdateAction$ExecutePartitionedUpdateOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.PartitionedUpdateAction$ExecutePartitionedUpdateOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.QueryAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.QueryAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.QueryAction$Parameter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.QueryAction$Parameter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.QueryResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.QueryResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ReadAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ReadAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ReadResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ReadResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.RestoreCloudDatabaseAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.RestoreCloudDatabaseAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.SpannerAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.SpannerAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.SpannerActionOutcome", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.SpannerActionOutcome$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.SpannerAsyncActionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.SpannerAsyncActionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.SpannerAsyncActionResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.SpannerAsyncActionResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.StartBatchTransactionAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.StartBatchTransactionAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.StartTransactionAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.StartTransactionAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.TableMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.TableMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.TransactionExecutionOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.TransactionExecutionOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.UpdateCloudBackupAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.UpdateCloudBackupAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.UpdateCloudDatabaseAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.UpdateCloudDatabaseAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.UpdateCloudInstanceAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.UpdateCloudInstanceAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.UpdateUserInstanceConfigAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.UpdateUserInstanceConfigAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ValueList", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.ValueList$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.WriteMutationsAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.executor.v1.WriteMutationsAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.BatchCreateSessionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.BatchCreateSessionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.BatchCreateSessionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.BatchCreateSessionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "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, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.BeginTransactionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.CommitRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.CommitRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.CommitResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.CommitResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.CommitResponse$CommitStats", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.CommitResponse$CommitStats$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.CreateSessionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.CreateSessionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.DeleteSessionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.DeleteSessionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.DirectedReadOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.DirectedReadOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.DirectedReadOptions$ExcludeReplicas", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.DirectedReadOptions$ExcludeReplicas$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.DirectedReadOptions$IncludeReplicas", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.DirectedReadOptions$IncludeReplicas$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.DirectedReadOptions$ReplicaSelection", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.DirectedReadOptions$ReplicaSelection$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.DirectedReadOptions$ReplicaSelection$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ExecuteBatchDmlRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ExecuteBatchDmlRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ExecuteBatchDmlRequest$Statement", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ExecuteBatchDmlRequest$Statement$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ExecuteBatchDmlResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ExecuteBatchDmlResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ExecuteSqlRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ExecuteSqlRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ExecuteSqlRequest$QueryMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ExecuteSqlRequest$QueryOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ExecuteSqlRequest$QueryOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.GetSessionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.GetSessionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeyRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeyRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeySet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.KeySet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ListSessionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ListSessionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ListSessionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ListSessionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Mutation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Mutation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Mutation$Delete", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Mutation$Delete$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Mutation$Write", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Mutation$Write$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PartialResultSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PartialResultSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Partition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Partition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PartitionOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PartitionOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PartitionQueryRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PartitionQueryRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PartitionReadRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PartitionReadRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PartitionResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PartitionResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PlanNode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PlanNode$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PlanNode$ChildLink", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PlanNode$ChildLink$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PlanNode$Kind", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PlanNode$ShortRepresentation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.PlanNode$ShortRepresentation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.QueryPlan", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.QueryPlan$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ReadRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ReadRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RequestOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RequestOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RequestOptions$Priority", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ResultSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ResultSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ResultSetMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ResultSetMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ResultSetStats", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ResultSetStats$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RollbackRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.RollbackRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Session", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Session$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.StructType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.StructType$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.StructType$Field", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.StructType$Field$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Transaction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Transaction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TransactionOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TransactionOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TransactionOptions$PartitionedDml", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TransactionOptions$PartitionedDml$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TransactionOptions$ReadOnly", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TransactionOptions$ReadOnly$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TransactionOptions$ReadWrite", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TransactionOptions$ReadWrite$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TransactionOptions$ReadWrite$ReadLockMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TransactionSelector", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TransactionSelector$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.Type$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TypeAnnotationCode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.TypeCode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/google-cloud-spanner-executor/src/test/java/com/google/cloud/spanner/executor/v1/MockSpannerExecutorProxy.java b/google-cloud-spanner-executor/src/test/java/com/google/cloud/spanner/executor/v1/MockSpannerExecutorProxy.java new file mode 100644 index 00000000000..6321a714a72 --- /dev/null +++ b/google-cloud-spanner-executor/src/test/java/com/google/cloud/spanner/executor/v1/MockSpannerExecutorProxy.java @@ -0,0 +1,59 @@ +/* + * 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. + */ + +package com.google.cloud.spanner.executor.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSpannerExecutorProxy implements MockGrpcService { + private final MockSpannerExecutorProxyImpl serviceImpl; + + public MockSpannerExecutorProxy() { + serviceImpl = new MockSpannerExecutorProxyImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-spanner-executor/src/test/java/com/google/cloud/spanner/executor/v1/MockSpannerExecutorProxyImpl.java b/google-cloud-spanner-executor/src/test/java/com/google/cloud/spanner/executor/v1/MockSpannerExecutorProxyImpl.java new file mode 100644 index 00000000000..d5b135b64a2 --- /dev/null +++ b/google-cloud-spanner-executor/src/test/java/com/google/cloud/spanner/executor/v1/MockSpannerExecutorProxyImpl.java @@ -0,0 +1,99 @@ +/* + * 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. + */ + +package com.google.cloud.spanner.executor.v1; + +import com.google.api.core.BetaApi; +import com.google.protobuf.AbstractMessage; +import com.google.spanner.executor.v1.SpannerAsyncActionRequest; +import com.google.spanner.executor.v1.SpannerAsyncActionResponse; +import com.google.spanner.executor.v1.SpannerExecutorProxyGrpc.SpannerExecutorProxyImplBase; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSpannerExecutorProxyImpl extends SpannerExecutorProxyImplBase { + private List requests; + private Queue responses; + + public MockSpannerExecutorProxyImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public StreamObserver executeActionAsync( + final StreamObserver responseObserver) { + StreamObserver requestObserver = + new StreamObserver() { + @Override + public void onNext(SpannerAsyncActionRequest value) { + requests.add(value); + final Object response = responses.remove(); + if (response instanceof SpannerAsyncActionResponse) { + responseObserver.onNext(((SpannerAsyncActionResponse) response)); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExecuteActionAsync, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SpannerAsyncActionResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void onError(Throwable t) { + responseObserver.onError(t); + } + + @Override + public void onCompleted() { + responseObserver.onCompleted(); + } + }; + return requestObserver; + } +} diff --git a/google-cloud-spanner-executor/src/test/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxyClientTest.java b/google-cloud-spanner-executor/src/test/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxyClientTest.java new file mode 100644 index 00000000000..b28fed3b4d8 --- /dev/null +++ b/google-cloud-spanner-executor/src/test/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxyClientTest.java @@ -0,0 +1,141 @@ +/* + * 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. + */ + +package com.google.cloud.spanner.executor.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.grpc.testing.MockStreamObserver; +import com.google.api.gax.rpc.ApiStreamObserver; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.spanner.executor.v1.SpannerAction; +import com.google.spanner.executor.v1.SpannerActionOutcome; +import com.google.spanner.executor.v1.SpannerAsyncActionRequest; +import com.google.spanner.executor.v1.SpannerAsyncActionResponse; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class SpannerExecutorProxyClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockSpannerExecutorProxy mockSpannerExecutorProxy; + private LocalChannelProvider channelProvider; + private SpannerExecutorProxyClient client; + + @BeforeClass + public static void startStaticServer() { + mockSpannerExecutorProxy = new MockSpannerExecutorProxy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockSpannerExecutorProxy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + SpannerExecutorProxySettings settings = + SpannerExecutorProxySettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SpannerExecutorProxyClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void executeActionAsyncTest() throws Exception { + SpannerAsyncActionResponse expectedResponse = + SpannerAsyncActionResponse.newBuilder() + .setActionId(198295492) + .setOutcome(SpannerActionOutcome.newBuilder().build()) + .build(); + mockSpannerExecutorProxy.addResponse(expectedResponse); + SpannerAsyncActionRequest request = + SpannerAsyncActionRequest.newBuilder() + .setActionId(198295492) + .setAction(SpannerAction.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.executeActionAsyncCallable(); + ApiStreamObserver requestObserver = + callable.bidiStreamingCall(responseObserver); + + requestObserver.onNext(request); + requestObserver.onCompleted(); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void executeActionAsyncExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSpannerExecutorProxy.addException(exception); + SpannerAsyncActionRequest request = + SpannerAsyncActionRequest.newBuilder() + .setActionId(198295492) + .setAction(SpannerAction.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.executeActionAsyncCallable(); + ApiStreamObserver requestObserver = + callable.bidiStreamingCall(responseObserver); + + requestObserver.onNext(request); + + 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/google-cloud-spanner/pom.xml b/google-cloud-spanner/pom.xml index d340d45d37e..e929635d841 100644 --- a/google-cloud-spanner/pom.xml +++ b/google-cloud-spanner/pom.xml @@ -141,7 +141,7 @@ org.apache.maven.plugins maven-dependency-plugin - io.grpc:grpc-protobuf-lite,org.hamcrest:hamcrest,org.hamcrest:hamcrest-core,com.google.errorprone:error_prone_annotations,org.openjdk.jmh:jmh-generator-annprocess,com.google.api.grpc:grpc-google-cloud-spanner-v1,com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1,com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1,javax.annotation:javax.annotation-api,io.opencensus:opencensus-impl,org.graalvm.sdk:graal-sdk,io.grpc:grpc-grpclb,io.grpc:grpc-googleapis,io.grpc:grpc-rls + io.grpc:grpc-protobuf-lite,org.hamcrest:hamcrest,org.hamcrest:hamcrest-core,com.google.errorprone:error_prone_annotations,org.openjdk.jmh:jmh-generator-annprocess,com.google.api.grpc:grpc-google-cloud-spanner-v1,com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1,com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1,javax.annotation:javax.annotation-api,io.opencensus:opencensus-impl,org.graalvm.sdk:graal-sdk,io.grpc:grpc-grpclb,io.grpc:grpc-googleapis,io.grpc:grpc-rls,com.google.api.grpc:proto-google-cloud-spanner-executor-v1,com.google.api.grpc:grpc-google-cloud-spanner-executor-v1 @@ -198,10 +198,20 @@ com.google.api.grpc proto-google-common-protos + + com.google.api.grpc + proto-google-cloud-spanner-executor-v1 + 1.4.0 + com.google.api.grpc grpc-google-common-protos + + com.google.api.grpc + grpc-google-cloud-spanner-executor-v1 + test + com.google.api.grpc proto-google-iam-v1 diff --git a/grpc-google-cloud-spanner-executor-v1/pom.xml b/grpc-google-cloud-spanner-executor-v1/pom.xml new file mode 100644 index 00000000000..2566ebef476 --- /dev/null +++ b/grpc-google-cloud-spanner-executor-v1/pom.xml @@ -0,0 +1,81 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-spanner-executor-v1 + 6.55.1-SNAPSHOT + grpc-google-cloud-spanner-executor-v1 + GRPC library for google-cloud-spanner + + com.google.cloud + google-cloud-spanner-parent + 6.55.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-spanner-executor-v1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + com.google.api.grpc:proto-google-common-protos,com.google.guava:guava + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerExecutorProxyGrpc.java b/grpc-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerExecutorProxyGrpc.java new file mode 100644 index 00000000000..141c4afeb41 --- /dev/null +++ b/grpc-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerExecutorProxyGrpc.java @@ -0,0 +1,367 @@ +/* + * 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. + */ +package com.google.spanner.executor.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service that executes SpannerActions asynchronously.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/spanner/executor/v1/cloud_executor.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class SpannerExecutorProxyGrpc { + + private SpannerExecutorProxyGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.spanner.executor.v1.SpannerExecutorProxy"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.spanner.executor.v1.SpannerAsyncActionRequest, + com.google.spanner.executor.v1.SpannerAsyncActionResponse> + getExecuteActionAsyncMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExecuteActionAsync", + requestType = com.google.spanner.executor.v1.SpannerAsyncActionRequest.class, + responseType = com.google.spanner.executor.v1.SpannerAsyncActionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.spanner.executor.v1.SpannerAsyncActionRequest, + com.google.spanner.executor.v1.SpannerAsyncActionResponse> + getExecuteActionAsyncMethod() { + io.grpc.MethodDescriptor< + com.google.spanner.executor.v1.SpannerAsyncActionRequest, + com.google.spanner.executor.v1.SpannerAsyncActionResponse> + getExecuteActionAsyncMethod; + if ((getExecuteActionAsyncMethod = SpannerExecutorProxyGrpc.getExecuteActionAsyncMethod) + == null) { + synchronized (SpannerExecutorProxyGrpc.class) { + if ((getExecuteActionAsyncMethod = SpannerExecutorProxyGrpc.getExecuteActionAsyncMethod) + == null) { + SpannerExecutorProxyGrpc.getExecuteActionAsyncMethod = + getExecuteActionAsyncMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecuteActionAsync")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.executor.v1.SpannerAsyncActionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.spanner.executor.v1.SpannerAsyncActionResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SpannerExecutorProxyMethodDescriptorSupplier("ExecuteActionAsync")) + .build(); + } + } + } + return getExecuteActionAsyncMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static SpannerExecutorProxyStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SpannerExecutorProxyStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SpannerExecutorProxyStub(channel, callOptions); + } + }; + return SpannerExecutorProxyStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SpannerExecutorProxyBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SpannerExecutorProxyBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SpannerExecutorProxyBlockingStub(channel, callOptions); + } + }; + return SpannerExecutorProxyBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static SpannerExecutorProxyFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SpannerExecutorProxyFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SpannerExecutorProxyFutureStub(channel, callOptions); + } + }; + return SpannerExecutorProxyFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service that executes SpannerActions asynchronously.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * ExecuteActionAsync is a streaming call that starts executing a new Spanner
+     * action.
+     * For each request, the server will reply with one or more responses, but
+     * only the last response will contain status in the outcome.
+     * Responses can be matched to requests by action_id. It is allowed to have
+     * multiple actions in flight--in that case, actions are be executed in
+     * parallel.
+     * 
+ */ + default io.grpc.stub.StreamObserver + executeActionAsync( + io.grpc.stub.StreamObserver + responseObserver) { + return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( + getExecuteActionAsyncMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service SpannerExecutorProxy. + * + *
+   * Service that executes SpannerActions asynchronously.
+   * 
+ */ + public abstract static class SpannerExecutorProxyImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return SpannerExecutorProxyGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service SpannerExecutorProxy. + * + *
+   * Service that executes SpannerActions asynchronously.
+   * 
+ */ + public static final class SpannerExecutorProxyStub + extends io.grpc.stub.AbstractAsyncStub { + private SpannerExecutorProxyStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SpannerExecutorProxyStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SpannerExecutorProxyStub(channel, callOptions); + } + + /** + * + * + *
+     * ExecuteActionAsync is a streaming call that starts executing a new Spanner
+     * action.
+     * For each request, the server will reply with one or more responses, but
+     * only the last response will contain status in the outcome.
+     * Responses can be matched to requests by action_id. It is allowed to have
+     * multiple actions in flight--in that case, actions are be executed in
+     * parallel.
+     * 
+ */ + public io.grpc.stub.StreamObserver + executeActionAsync( + io.grpc.stub.StreamObserver + responseObserver) { + return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( + getChannel().newCall(getExecuteActionAsyncMethod(), getCallOptions()), responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service SpannerExecutorProxy. + * + *
+   * Service that executes SpannerActions asynchronously.
+   * 
+ */ + public static final class SpannerExecutorProxyBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private SpannerExecutorProxyBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SpannerExecutorProxyBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SpannerExecutorProxyBlockingStub(channel, callOptions); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service SpannerExecutorProxy. + * + *
+   * Service that executes SpannerActions asynchronously.
+   * 
+ */ + public static final class SpannerExecutorProxyFutureStub + extends io.grpc.stub.AbstractFutureStub { + private SpannerExecutorProxyFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SpannerExecutorProxyFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SpannerExecutorProxyFutureStub(channel, callOptions); + } + } + + private static final int METHODID_EXECUTE_ACTION_ASYNC = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_EXECUTE_ACTION_ASYNC: + return (io.grpc.stub.StreamObserver) + serviceImpl.executeActionAsync( + (io.grpc.stub.StreamObserver< + com.google.spanner.executor.v1.SpannerAsyncActionResponse>) + responseObserver); + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getExecuteActionAsyncMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.google.spanner.executor.v1.SpannerAsyncActionRequest, + com.google.spanner.executor.v1.SpannerAsyncActionResponse>( + service, METHODID_EXECUTE_ACTION_ASYNC))) + .build(); + } + + private abstract static class SpannerExecutorProxyBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SpannerExecutorProxyBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SpannerExecutorProxy"); + } + } + + private static final class SpannerExecutorProxyFileDescriptorSupplier + extends SpannerExecutorProxyBaseDescriptorSupplier { + SpannerExecutorProxyFileDescriptorSupplier() {} + } + + private static final class SpannerExecutorProxyMethodDescriptorSupplier + extends SpannerExecutorProxyBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + SpannerExecutorProxyMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SpannerExecutorProxyGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SpannerExecutorProxyFileDescriptorSupplier()) + .addMethod(getExecuteActionAsyncMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/pom.xml b/pom.xml index 7cf88c52e8c..c29fe56e963 100644 --- a/pom.xml +++ b/pom.xml @@ -64,6 +64,16 @@ proto-google-cloud-spanner-admin-instance-v1 6.55.1-SNAPSHOT
+ + com.google.api.grpc + proto-google-cloud-spanner-executor-v1 + 6.55.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-spanner-executor-v1 + 6.55.1-SNAPSHOT + com.google.api.grpc proto-google-cloud-spanner-v1 @@ -129,9 +139,11 @@ grpc-google-cloud-spanner-v1 grpc-google-cloud-spanner-admin-instance-v1 grpc-google-cloud-spanner-admin-database-v1 + grpc-google-cloud-spanner-executor-v1 proto-google-cloud-spanner-admin-instance-v1 proto-google-cloud-spanner-v1 proto-google-cloud-spanner-admin-database-v1 + proto-google-cloud-spanner-executor-v1 google-cloud-spanner-executor google-cloud-spanner-bom diff --git a/proto-google-cloud-spanner-executor-v1/clirr-ignored-differences.xml b/proto-google-cloud-spanner-executor-v1/clirr-ignored-differences.xml new file mode 100644 index 00000000000..cfd1e566a20 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/clirr-ignored-differences.xml @@ -0,0 +1,39 @@ + + + + + 7012 + com/google/spanner/executor/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/spanner/executor/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/spanner/executor/v1/*OrBuilder + boolean has*(*) + + + 8001 + com/google/spanner/executor/v1/SpannerExecutorProxyGrpc + + + 8001 + com/google/spanner/executor/v1/SpannerExecutorProxyGrpc$SpannerExecutorProxyBlockingStub + + + 8001 + com/google/spanner/executor/v1/SpannerExecutorProxyGrpc$SpannerExecutorProxyFutureStub + + + 8001 + com/google/spanner/executor/v1/SpannerExecutorProxyGrpc$SpannerExecutorProxyImplBase + + + 8001 + com/google/spanner/executor/v1/SpannerExecutorProxyGrpc$SpannerExecutorProxyStub + + diff --git a/proto-google-cloud-spanner-executor-v1/pom.xml b/proto-google-cloud-spanner-executor-v1/pom.xml new file mode 100644 index 00000000000..4f0b5f097f0 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/pom.xml @@ -0,0 +1,70 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-spanner-executor-v1 + 6.55.1-SNAPSHOT + proto-google-cloud-spanner-executor-v1 + Proto library for google-cloud-spanner + + com.google.cloud + google-cloud-spanner-parent + 6.55.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + com.google.api.grpc + proto-google-cloud-spanner-v1 + + + com.google.api.grpc + proto-google-cloud-spanner-admin-instance-v1 + + + com.google.api.grpc + proto-google-cloud-spanner-admin-database-v1 + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + com.google.api.grpc:proto-google-iam-v1,com.google.api:api-common,com.google.guava:guava + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminAction.java new file mode 100644 index 00000000000..0477201f7a6 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminAction.java @@ -0,0 +1,9228 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * AdminAction defines all the cloud spanner admin actions, including
+ * instance/database admin ops, backup ops and operation actions.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.AdminAction} + */ +public final class AdminAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.AdminAction) + AdminActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AdminAction.newBuilder() to construct. + private AdminAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AdminAction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AdminAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdminAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdminAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.AdminAction.class, + com.google.spanner.executor.v1.AdminAction.Builder.class); + } + + private int actionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object action_; + + public enum ActionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CREATE_USER_INSTANCE_CONFIG(1), + UPDATE_USER_INSTANCE_CONFIG(2), + DELETE_USER_INSTANCE_CONFIG(3), + GET_CLOUD_INSTANCE_CONFIG(4), + LIST_INSTANCE_CONFIGS(5), + CREATE_CLOUD_INSTANCE(6), + UPDATE_CLOUD_INSTANCE(7), + DELETE_CLOUD_INSTANCE(8), + LIST_CLOUD_INSTANCES(9), + GET_CLOUD_INSTANCE(10), + CREATE_CLOUD_DATABASE(11), + UPDATE_CLOUD_DATABASE_DDL(12), + UPDATE_CLOUD_DATABASE(27), + DROP_CLOUD_DATABASE(13), + LIST_CLOUD_DATABASES(14), + LIST_CLOUD_DATABASE_OPERATIONS(15), + RESTORE_CLOUD_DATABASE(16), + GET_CLOUD_DATABASE(17), + CREATE_CLOUD_BACKUP(18), + COPY_CLOUD_BACKUP(19), + GET_CLOUD_BACKUP(20), + UPDATE_CLOUD_BACKUP(21), + DELETE_CLOUD_BACKUP(22), + LIST_CLOUD_BACKUPS(23), + LIST_CLOUD_BACKUP_OPERATIONS(24), + GET_OPERATION(25), + CANCEL_OPERATION(26), + RECONFIGURE_CLOUD_DATABASE(28), + ACTION_NOT_SET(0); + private final int value; + + private ActionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActionCase valueOf(int value) { + return forNumber(value); + } + + public static ActionCase forNumber(int value) { + switch (value) { + case 1: + return CREATE_USER_INSTANCE_CONFIG; + case 2: + return UPDATE_USER_INSTANCE_CONFIG; + case 3: + return DELETE_USER_INSTANCE_CONFIG; + case 4: + return GET_CLOUD_INSTANCE_CONFIG; + case 5: + return LIST_INSTANCE_CONFIGS; + case 6: + return CREATE_CLOUD_INSTANCE; + case 7: + return UPDATE_CLOUD_INSTANCE; + case 8: + return DELETE_CLOUD_INSTANCE; + case 9: + return LIST_CLOUD_INSTANCES; + case 10: + return GET_CLOUD_INSTANCE; + case 11: + return CREATE_CLOUD_DATABASE; + case 12: + return UPDATE_CLOUD_DATABASE_DDL; + case 27: + return UPDATE_CLOUD_DATABASE; + case 13: + return DROP_CLOUD_DATABASE; + case 14: + return LIST_CLOUD_DATABASES; + case 15: + return LIST_CLOUD_DATABASE_OPERATIONS; + case 16: + return RESTORE_CLOUD_DATABASE; + case 17: + return GET_CLOUD_DATABASE; + case 18: + return CREATE_CLOUD_BACKUP; + case 19: + return COPY_CLOUD_BACKUP; + case 20: + return GET_CLOUD_BACKUP; + case 21: + return UPDATE_CLOUD_BACKUP; + case 22: + return DELETE_CLOUD_BACKUP; + case 23: + return LIST_CLOUD_BACKUPS; + case 24: + return LIST_CLOUD_BACKUP_OPERATIONS; + case 25: + return GET_OPERATION; + case 26: + return CANCEL_OPERATION; + case 28: + return RECONFIGURE_CLOUD_DATABASE; + case 0: + return ACTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public static final int CREATE_USER_INSTANCE_CONFIG_FIELD_NUMBER = 1; + /** + * + * + *
+   * Action that creates a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + * + * @return Whether the createUserInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasCreateUserInstanceConfig() { + return actionCase_ == 1; + } + /** + * + * + *
+   * Action that creates a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + * + * @return The createUserInstanceConfig. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateUserInstanceConfigAction + getCreateUserInstanceConfig() { + if (actionCase_ == 1) { + return (com.google.spanner.executor.v1.CreateUserInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.CreateUserInstanceConfigAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that creates a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateUserInstanceConfigActionOrBuilder + getCreateUserInstanceConfigOrBuilder() { + if (actionCase_ == 1) { + return (com.google.spanner.executor.v1.CreateUserInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.CreateUserInstanceConfigAction.getDefaultInstance(); + } + + public static final int UPDATE_USER_INSTANCE_CONFIG_FIELD_NUMBER = 2; + /** + * + * + *
+   * Action that updates a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + * + * @return Whether the updateUserInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasUpdateUserInstanceConfig() { + return actionCase_ == 2; + } + /** + * + * + *
+   * Action that updates a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + * + * @return The updateUserInstanceConfig. + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateUserInstanceConfigAction + getUpdateUserInstanceConfig() { + if (actionCase_ == 2) { + return (com.google.spanner.executor.v1.UpdateUserInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that updates a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateUserInstanceConfigActionOrBuilder + getUpdateUserInstanceConfigOrBuilder() { + if (actionCase_ == 2) { + return (com.google.spanner.executor.v1.UpdateUserInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.getDefaultInstance(); + } + + public static final int DELETE_USER_INSTANCE_CONFIG_FIELD_NUMBER = 3; + /** + * + * + *
+   * Action that deletes a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + * + * @return Whether the deleteUserInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasDeleteUserInstanceConfig() { + return actionCase_ == 3; + } + /** + * + * + *
+   * Action that deletes a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + * + * @return The deleteUserInstanceConfig. + */ + @java.lang.Override + public com.google.spanner.executor.v1.DeleteUserInstanceConfigAction + getDeleteUserInstanceConfig() { + if (actionCase_ == 3) { + return (com.google.spanner.executor.v1.DeleteUserInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that deletes a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.DeleteUserInstanceConfigActionOrBuilder + getDeleteUserInstanceConfigOrBuilder() { + if (actionCase_ == 3) { + return (com.google.spanner.executor.v1.DeleteUserInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.getDefaultInstance(); + } + + public static final int GET_CLOUD_INSTANCE_CONFIG_FIELD_NUMBER = 4; + /** + * + * + *
+   * Action that gets a user instance config.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + * + * @return Whether the getCloudInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasGetCloudInstanceConfig() { + return actionCase_ == 4; + } + /** + * + * + *
+   * Action that gets a user instance config.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + * + * @return The getCloudInstanceConfig. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceConfigAction getGetCloudInstanceConfig() { + if (actionCase_ == 4) { + return (com.google.spanner.executor.v1.GetCloudInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.GetCloudInstanceConfigAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that gets a user instance config.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceConfigActionOrBuilder + getGetCloudInstanceConfigOrBuilder() { + if (actionCase_ == 4) { + return (com.google.spanner.executor.v1.GetCloudInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.GetCloudInstanceConfigAction.getDefaultInstance(); + } + + public static final int LIST_INSTANCE_CONFIGS_FIELD_NUMBER = 5; + /** + * + * + *
+   * Action that lists user instance configs.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + * + * @return Whether the listInstanceConfigs field is set. + */ + @java.lang.Override + public boolean hasListInstanceConfigs() { + return actionCase_ == 5; + } + /** + * + * + *
+   * Action that lists user instance configs.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + * + * @return The listInstanceConfigs. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstanceConfigsAction getListInstanceConfigs() { + if (actionCase_ == 5) { + return (com.google.spanner.executor.v1.ListCloudInstanceConfigsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that lists user instance configs.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstanceConfigsActionOrBuilder + getListInstanceConfigsOrBuilder() { + if (actionCase_ == 5) { + return (com.google.spanner.executor.v1.ListCloudInstanceConfigsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.getDefaultInstance(); + } + + public static final int CREATE_CLOUD_INSTANCE_FIELD_NUMBER = 6; + /** + * + * + *
+   * Action that creates a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + * + * @return Whether the createCloudInstance field is set. + */ + @java.lang.Override + public boolean hasCreateCloudInstance() { + return actionCase_ == 6; + } + /** + * + * + *
+   * Action that creates a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + * + * @return The createCloudInstance. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudInstanceAction getCreateCloudInstance() { + if (actionCase_ == 6) { + return (com.google.spanner.executor.v1.CreateCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.CreateCloudInstanceAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that creates a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudInstanceActionOrBuilder + getCreateCloudInstanceOrBuilder() { + if (actionCase_ == 6) { + return (com.google.spanner.executor.v1.CreateCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.CreateCloudInstanceAction.getDefaultInstance(); + } + + public static final int UPDATE_CLOUD_INSTANCE_FIELD_NUMBER = 7; + /** + * + * + *
+   * Action that updates a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + * + * @return Whether the updateCloudInstance field is set. + */ + @java.lang.Override + public boolean hasUpdateCloudInstance() { + return actionCase_ == 7; + } + /** + * + * + *
+   * Action that updates a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + * + * @return The updateCloudInstance. + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudInstanceAction getUpdateCloudInstance() { + if (actionCase_ == 7) { + return (com.google.spanner.executor.v1.UpdateCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudInstanceAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that updates a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudInstanceActionOrBuilder + getUpdateCloudInstanceOrBuilder() { + if (actionCase_ == 7) { + return (com.google.spanner.executor.v1.UpdateCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudInstanceAction.getDefaultInstance(); + } + + public static final int DELETE_CLOUD_INSTANCE_FIELD_NUMBER = 8; + /** + * + * + *
+   * Action that deletes a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + * + * @return Whether the deleteCloudInstance field is set. + */ + @java.lang.Override + public boolean hasDeleteCloudInstance() { + return actionCase_ == 8; + } + /** + * + * + *
+   * Action that deletes a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + * + * @return The deleteCloudInstance. + */ + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudInstanceAction getDeleteCloudInstance() { + if (actionCase_ == 8) { + return (com.google.spanner.executor.v1.DeleteCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.DeleteCloudInstanceAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that deletes a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudInstanceActionOrBuilder + getDeleteCloudInstanceOrBuilder() { + if (actionCase_ == 8) { + return (com.google.spanner.executor.v1.DeleteCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.DeleteCloudInstanceAction.getDefaultInstance(); + } + + public static final int LIST_CLOUD_INSTANCES_FIELD_NUMBER = 9; + /** + * + * + *
+   * Action that lists Cloud Spanner instances.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + * + * @return Whether the listCloudInstances field is set. + */ + @java.lang.Override + public boolean hasListCloudInstances() { + return actionCase_ == 9; + } + /** + * + * + *
+   * Action that lists Cloud Spanner instances.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + * + * @return The listCloudInstances. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstancesAction getListCloudInstances() { + if (actionCase_ == 9) { + return (com.google.spanner.executor.v1.ListCloudInstancesAction) action_; + } + return com.google.spanner.executor.v1.ListCloudInstancesAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that lists Cloud Spanner instances.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstancesActionOrBuilder + getListCloudInstancesOrBuilder() { + if (actionCase_ == 9) { + return (com.google.spanner.executor.v1.ListCloudInstancesAction) action_; + } + return com.google.spanner.executor.v1.ListCloudInstancesAction.getDefaultInstance(); + } + + public static final int GET_CLOUD_INSTANCE_FIELD_NUMBER = 10; + /** + * + * + *
+   * Action that retrieves a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + * + * @return Whether the getCloudInstance field is set. + */ + @java.lang.Override + public boolean hasGetCloudInstance() { + return actionCase_ == 10; + } + /** + * + * + *
+   * Action that retrieves a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + * + * @return The getCloudInstance. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceAction getGetCloudInstance() { + if (actionCase_ == 10) { + return (com.google.spanner.executor.v1.GetCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.GetCloudInstanceAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that retrieves a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceActionOrBuilder + getGetCloudInstanceOrBuilder() { + if (actionCase_ == 10) { + return (com.google.spanner.executor.v1.GetCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.GetCloudInstanceAction.getDefaultInstance(); + } + + public static final int CREATE_CLOUD_DATABASE_FIELD_NUMBER = 11; + /** + * + * + *
+   * Action that creates a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + * @return Whether the createCloudDatabase field is set. + */ + @java.lang.Override + public boolean hasCreateCloudDatabase() { + return actionCase_ == 11; + } + /** + * + * + *
+   * Action that creates a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + * @return The createCloudDatabase. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudDatabaseAction getCreateCloudDatabase() { + if (actionCase_ == 11) { + return (com.google.spanner.executor.v1.CreateCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.CreateCloudDatabaseAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that creates a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudDatabaseActionOrBuilder + getCreateCloudDatabaseOrBuilder() { + if (actionCase_ == 11) { + return (com.google.spanner.executor.v1.CreateCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.CreateCloudDatabaseAction.getDefaultInstance(); + } + + public static final int UPDATE_CLOUD_DATABASE_DDL_FIELD_NUMBER = 12; + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + * + * @return Whether the updateCloudDatabaseDdl field is set. + */ + @java.lang.Override + public boolean hasUpdateCloudDatabaseDdl() { + return actionCase_ == 12; + } + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + * + * @return The updateCloudDatabaseDdl. + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction getUpdateCloudDatabaseDdl() { + if (actionCase_ == 12) { + return (com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseDdlActionOrBuilder + getUpdateCloudDatabaseDdlOrBuilder() { + if (actionCase_ == 12) { + return (com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.getDefaultInstance(); + } + + public static final int UPDATE_CLOUD_DATABASE_FIELD_NUMBER = 27; + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + * @return Whether the updateCloudDatabase field is set. + */ + @java.lang.Override + public boolean hasUpdateCloudDatabase() { + return actionCase_ == 27; + } + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + * @return The updateCloudDatabase. + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseAction getUpdateCloudDatabase() { + if (actionCase_ == 27) { + return (com.google.spanner.executor.v1.UpdateCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudDatabaseAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseActionOrBuilder + getUpdateCloudDatabaseOrBuilder() { + if (actionCase_ == 27) { + return (com.google.spanner.executor.v1.UpdateCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudDatabaseAction.getDefaultInstance(); + } + + public static final int DROP_CLOUD_DATABASE_FIELD_NUMBER = 13; + /** + * + * + *
+   * Action that drops a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + * + * @return Whether the dropCloudDatabase field is set. + */ + @java.lang.Override + public boolean hasDropCloudDatabase() { + return actionCase_ == 13; + } + /** + * + * + *
+   * Action that drops a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + * + * @return The dropCloudDatabase. + */ + @java.lang.Override + public com.google.spanner.executor.v1.DropCloudDatabaseAction getDropCloudDatabase() { + if (actionCase_ == 13) { + return (com.google.spanner.executor.v1.DropCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.DropCloudDatabaseAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that drops a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DropCloudDatabaseActionOrBuilder + getDropCloudDatabaseOrBuilder() { + if (actionCase_ == 13) { + return (com.google.spanner.executor.v1.DropCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.DropCloudDatabaseAction.getDefaultInstance(); + } + + public static final int LIST_CLOUD_DATABASES_FIELD_NUMBER = 14; + /** + * + * + *
+   * Action that lists Cloud Spanner databases.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + * + * @return Whether the listCloudDatabases field is set. + */ + @java.lang.Override + public boolean hasListCloudDatabases() { + return actionCase_ == 14; + } + /** + * + * + *
+   * Action that lists Cloud Spanner databases.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + * + * @return The listCloudDatabases. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabasesAction getListCloudDatabases() { + if (actionCase_ == 14) { + return (com.google.spanner.executor.v1.ListCloudDatabasesAction) action_; + } + return com.google.spanner.executor.v1.ListCloudDatabasesAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that lists Cloud Spanner databases.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabasesActionOrBuilder + getListCloudDatabasesOrBuilder() { + if (actionCase_ == 14) { + return (com.google.spanner.executor.v1.ListCloudDatabasesAction) action_; + } + return com.google.spanner.executor.v1.ListCloudDatabasesAction.getDefaultInstance(); + } + + public static final int LIST_CLOUD_DATABASE_OPERATIONS_FIELD_NUMBER = 15; + /** + * + * + *
+   * Action that lists Cloud Spanner database operations.
+   * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + * + * @return Whether the listCloudDatabaseOperations field is set. + */ + @java.lang.Override + public boolean hasListCloudDatabaseOperations() { + return actionCase_ == 15; + } + /** + * + * + *
+   * Action that lists Cloud Spanner database operations.
+   * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + * + * @return The listCloudDatabaseOperations. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction + getListCloudDatabaseOperations() { + if (actionCase_ == 15) { + return (com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that lists Cloud Spanner database operations.
+   * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabaseOperationsActionOrBuilder + getListCloudDatabaseOperationsOrBuilder() { + if (actionCase_ == 15) { + return (com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.getDefaultInstance(); + } + + public static final int RESTORE_CLOUD_DATABASE_FIELD_NUMBER = 16; + /** + * + * + *
+   * Action that restores a Cloud Spanner database from a backup.
+   * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + * + * @return Whether the restoreCloudDatabase field is set. + */ + @java.lang.Override + public boolean hasRestoreCloudDatabase() { + return actionCase_ == 16; + } + /** + * + * + *
+   * Action that restores a Cloud Spanner database from a backup.
+   * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + * + * @return The restoreCloudDatabase. + */ + @java.lang.Override + public com.google.spanner.executor.v1.RestoreCloudDatabaseAction getRestoreCloudDatabase() { + if (actionCase_ == 16) { + return (com.google.spanner.executor.v1.RestoreCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.RestoreCloudDatabaseAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that restores a Cloud Spanner database from a backup.
+   * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.RestoreCloudDatabaseActionOrBuilder + getRestoreCloudDatabaseOrBuilder() { + if (actionCase_ == 16) { + return (com.google.spanner.executor.v1.RestoreCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.RestoreCloudDatabaseAction.getDefaultInstance(); + } + + public static final int GET_CLOUD_DATABASE_FIELD_NUMBER = 17; + /** + * + * + *
+   * Action that gets a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + * + * @return Whether the getCloudDatabase field is set. + */ + @java.lang.Override + public boolean hasGetCloudDatabase() { + return actionCase_ == 17; + } + /** + * + * + *
+   * Action that gets a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + * + * @return The getCloudDatabase. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudDatabaseAction getGetCloudDatabase() { + if (actionCase_ == 17) { + return (com.google.spanner.executor.v1.GetCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.GetCloudDatabaseAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that gets a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudDatabaseActionOrBuilder + getGetCloudDatabaseOrBuilder() { + if (actionCase_ == 17) { + return (com.google.spanner.executor.v1.GetCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.GetCloudDatabaseAction.getDefaultInstance(); + } + + public static final int CREATE_CLOUD_BACKUP_FIELD_NUMBER = 18; + /** + * + * + *
+   * Action that creates a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + * + * @return Whether the createCloudBackup field is set. + */ + @java.lang.Override + public boolean hasCreateCloudBackup() { + return actionCase_ == 18; + } + /** + * + * + *
+   * Action that creates a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + * + * @return The createCloudBackup. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudBackupAction getCreateCloudBackup() { + if (actionCase_ == 18) { + return (com.google.spanner.executor.v1.CreateCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.CreateCloudBackupAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that creates a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudBackupActionOrBuilder + getCreateCloudBackupOrBuilder() { + if (actionCase_ == 18) { + return (com.google.spanner.executor.v1.CreateCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.CreateCloudBackupAction.getDefaultInstance(); + } + + public static final int COPY_CLOUD_BACKUP_FIELD_NUMBER = 19; + /** + * + * + *
+   * Action that copies a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + * + * @return Whether the copyCloudBackup field is set. + */ + @java.lang.Override + public boolean hasCopyCloudBackup() { + return actionCase_ == 19; + } + /** + * + * + *
+   * Action that copies a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + * + * @return The copyCloudBackup. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CopyCloudBackupAction getCopyCloudBackup() { + if (actionCase_ == 19) { + return (com.google.spanner.executor.v1.CopyCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.CopyCloudBackupAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that copies a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CopyCloudBackupActionOrBuilder + getCopyCloudBackupOrBuilder() { + if (actionCase_ == 19) { + return (com.google.spanner.executor.v1.CopyCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.CopyCloudBackupAction.getDefaultInstance(); + } + + public static final int GET_CLOUD_BACKUP_FIELD_NUMBER = 20; + /** + * + * + *
+   * Action that gets a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + * + * @return Whether the getCloudBackup field is set. + */ + @java.lang.Override + public boolean hasGetCloudBackup() { + return actionCase_ == 20; + } + /** + * + * + *
+   * Action that gets a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + * + * @return The getCloudBackup. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudBackupAction getGetCloudBackup() { + if (actionCase_ == 20) { + return (com.google.spanner.executor.v1.GetCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.GetCloudBackupAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that gets a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudBackupActionOrBuilder getGetCloudBackupOrBuilder() { + if (actionCase_ == 20) { + return (com.google.spanner.executor.v1.GetCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.GetCloudBackupAction.getDefaultInstance(); + } + + public static final int UPDATE_CLOUD_BACKUP_FIELD_NUMBER = 21; + /** + * + * + *
+   * Action that updates a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + * + * @return Whether the updateCloudBackup field is set. + */ + @java.lang.Override + public boolean hasUpdateCloudBackup() { + return actionCase_ == 21; + } + /** + * + * + *
+   * Action that updates a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + * + * @return The updateCloudBackup. + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudBackupAction getUpdateCloudBackup() { + if (actionCase_ == 21) { + return (com.google.spanner.executor.v1.UpdateCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudBackupAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that updates a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudBackupActionOrBuilder + getUpdateCloudBackupOrBuilder() { + if (actionCase_ == 21) { + return (com.google.spanner.executor.v1.UpdateCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudBackupAction.getDefaultInstance(); + } + + public static final int DELETE_CLOUD_BACKUP_FIELD_NUMBER = 22; + /** + * + * + *
+   * Action that deletes a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + * + * @return Whether the deleteCloudBackup field is set. + */ + @java.lang.Override + public boolean hasDeleteCloudBackup() { + return actionCase_ == 22; + } + /** + * + * + *
+   * Action that deletes a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + * + * @return The deleteCloudBackup. + */ + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudBackupAction getDeleteCloudBackup() { + if (actionCase_ == 22) { + return (com.google.spanner.executor.v1.DeleteCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.DeleteCloudBackupAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that deletes a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudBackupActionOrBuilder + getDeleteCloudBackupOrBuilder() { + if (actionCase_ == 22) { + return (com.google.spanner.executor.v1.DeleteCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.DeleteCloudBackupAction.getDefaultInstance(); + } + + public static final int LIST_CLOUD_BACKUPS_FIELD_NUMBER = 23; + /** + * + * + *
+   * Action that lists Cloud Spanner database backups.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + * + * @return Whether the listCloudBackups field is set. + */ + @java.lang.Override + public boolean hasListCloudBackups() { + return actionCase_ == 23; + } + /** + * + * + *
+   * Action that lists Cloud Spanner database backups.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + * + * @return The listCloudBackups. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupsAction getListCloudBackups() { + if (actionCase_ == 23) { + return (com.google.spanner.executor.v1.ListCloudBackupsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudBackupsAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that lists Cloud Spanner database backups.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupsActionOrBuilder + getListCloudBackupsOrBuilder() { + if (actionCase_ == 23) { + return (com.google.spanner.executor.v1.ListCloudBackupsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudBackupsAction.getDefaultInstance(); + } + + public static final int LIST_CLOUD_BACKUP_OPERATIONS_FIELD_NUMBER = 24; + /** + * + * + *
+   * Action that lists Cloud Spanner database backup operations.
+   * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + * + * @return Whether the listCloudBackupOperations field is set. + */ + @java.lang.Override + public boolean hasListCloudBackupOperations() { + return actionCase_ == 24; + } + /** + * + * + *
+   * Action that lists Cloud Spanner database backup operations.
+   * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + * + * @return The listCloudBackupOperations. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupOperationsAction + getListCloudBackupOperations() { + if (actionCase_ == 24) { + return (com.google.spanner.executor.v1.ListCloudBackupOperationsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudBackupOperationsAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that lists Cloud Spanner database backup operations.
+   * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupOperationsActionOrBuilder + getListCloudBackupOperationsOrBuilder() { + if (actionCase_ == 24) { + return (com.google.spanner.executor.v1.ListCloudBackupOperationsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudBackupOperationsAction.getDefaultInstance(); + } + + public static final int GET_OPERATION_FIELD_NUMBER = 25; + /** + * + * + *
+   * Action that gets an operation.
+   * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + * + * @return Whether the getOperation field is set. + */ + @java.lang.Override + public boolean hasGetOperation() { + return actionCase_ == 25; + } + /** + * + * + *
+   * Action that gets an operation.
+   * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + * + * @return The getOperation. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetOperationAction getGetOperation() { + if (actionCase_ == 25) { + return (com.google.spanner.executor.v1.GetOperationAction) action_; + } + return com.google.spanner.executor.v1.GetOperationAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that gets an operation.
+   * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetOperationActionOrBuilder getGetOperationOrBuilder() { + if (actionCase_ == 25) { + return (com.google.spanner.executor.v1.GetOperationAction) action_; + } + return com.google.spanner.executor.v1.GetOperationAction.getDefaultInstance(); + } + + public static final int CANCEL_OPERATION_FIELD_NUMBER = 26; + /** + * + * + *
+   * Action that cancels an operation.
+   * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + * + * @return Whether the cancelOperation field is set. + */ + @java.lang.Override + public boolean hasCancelOperation() { + return actionCase_ == 26; + } + /** + * + * + *
+   * Action that cancels an operation.
+   * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + * + * @return The cancelOperation. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CancelOperationAction getCancelOperation() { + if (actionCase_ == 26) { + return (com.google.spanner.executor.v1.CancelOperationAction) action_; + } + return com.google.spanner.executor.v1.CancelOperationAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that cancels an operation.
+   * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CancelOperationActionOrBuilder + getCancelOperationOrBuilder() { + if (actionCase_ == 26) { + return (com.google.spanner.executor.v1.CancelOperationAction) action_; + } + return com.google.spanner.executor.v1.CancelOperationAction.getDefaultInstance(); + } + + public static final int RECONFIGURE_CLOUD_DATABASE_FIELD_NUMBER = 28; + /** + * + * + *
+   * Action that reconfigures a Cloud Spanner database.
+   * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + * + * @return Whether the reconfigureCloudDatabase field is set. + */ + @java.lang.Override + public boolean hasReconfigureCloudDatabase() { + return actionCase_ == 28; + } + /** + * + * + *
+   * Action that reconfigures a Cloud Spanner database.
+   * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + * + * @return The reconfigureCloudDatabase. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction + getReconfigureCloudDatabase() { + if (actionCase_ == 28) { + return (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that reconfigures a Cloud Spanner database.
+   * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder + getReconfigureCloudDatabaseOrBuilder() { + if (actionCase_ == 28) { + return (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + } + + 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 (actionCase_ == 1) { + output.writeMessage( + 1, (com.google.spanner.executor.v1.CreateUserInstanceConfigAction) action_); + } + if (actionCase_ == 2) { + output.writeMessage( + 2, (com.google.spanner.executor.v1.UpdateUserInstanceConfigAction) action_); + } + if (actionCase_ == 3) { + output.writeMessage( + 3, (com.google.spanner.executor.v1.DeleteUserInstanceConfigAction) action_); + } + if (actionCase_ == 4) { + output.writeMessage(4, (com.google.spanner.executor.v1.GetCloudInstanceConfigAction) action_); + } + if (actionCase_ == 5) { + output.writeMessage( + 5, (com.google.spanner.executor.v1.ListCloudInstanceConfigsAction) action_); + } + if (actionCase_ == 6) { + output.writeMessage(6, (com.google.spanner.executor.v1.CreateCloudInstanceAction) action_); + } + if (actionCase_ == 7) { + output.writeMessage(7, (com.google.spanner.executor.v1.UpdateCloudInstanceAction) action_); + } + if (actionCase_ == 8) { + output.writeMessage(8, (com.google.spanner.executor.v1.DeleteCloudInstanceAction) action_); + } + if (actionCase_ == 9) { + output.writeMessage(9, (com.google.spanner.executor.v1.ListCloudInstancesAction) action_); + } + if (actionCase_ == 10) { + output.writeMessage(10, (com.google.spanner.executor.v1.GetCloudInstanceAction) action_); + } + if (actionCase_ == 11) { + output.writeMessage(11, (com.google.spanner.executor.v1.CreateCloudDatabaseAction) action_); + } + if (actionCase_ == 12) { + output.writeMessage( + 12, (com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) action_); + } + if (actionCase_ == 13) { + output.writeMessage(13, (com.google.spanner.executor.v1.DropCloudDatabaseAction) action_); + } + if (actionCase_ == 14) { + output.writeMessage(14, (com.google.spanner.executor.v1.ListCloudDatabasesAction) action_); + } + if (actionCase_ == 15) { + output.writeMessage( + 15, (com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction) action_); + } + if (actionCase_ == 16) { + output.writeMessage(16, (com.google.spanner.executor.v1.RestoreCloudDatabaseAction) action_); + } + if (actionCase_ == 17) { + output.writeMessage(17, (com.google.spanner.executor.v1.GetCloudDatabaseAction) action_); + } + if (actionCase_ == 18) { + output.writeMessage(18, (com.google.spanner.executor.v1.CreateCloudBackupAction) action_); + } + if (actionCase_ == 19) { + output.writeMessage(19, (com.google.spanner.executor.v1.CopyCloudBackupAction) action_); + } + if (actionCase_ == 20) { + output.writeMessage(20, (com.google.spanner.executor.v1.GetCloudBackupAction) action_); + } + if (actionCase_ == 21) { + output.writeMessage(21, (com.google.spanner.executor.v1.UpdateCloudBackupAction) action_); + } + if (actionCase_ == 22) { + output.writeMessage(22, (com.google.spanner.executor.v1.DeleteCloudBackupAction) action_); + } + if (actionCase_ == 23) { + output.writeMessage(23, (com.google.spanner.executor.v1.ListCloudBackupsAction) action_); + } + if (actionCase_ == 24) { + output.writeMessage( + 24, (com.google.spanner.executor.v1.ListCloudBackupOperationsAction) action_); + } + if (actionCase_ == 25) { + output.writeMessage(25, (com.google.spanner.executor.v1.GetOperationAction) action_); + } + if (actionCase_ == 26) { + output.writeMessage(26, (com.google.spanner.executor.v1.CancelOperationAction) action_); + } + if (actionCase_ == 27) { + output.writeMessage(27, (com.google.spanner.executor.v1.UpdateCloudDatabaseAction) action_); + } + if (actionCase_ == 28) { + output.writeMessage( + 28, (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (actionCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.spanner.executor.v1.CreateUserInstanceConfigAction) action_); + } + if (actionCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.spanner.executor.v1.UpdateUserInstanceConfigAction) action_); + } + if (actionCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.spanner.executor.v1.DeleteUserInstanceConfigAction) action_); + } + if (actionCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.spanner.executor.v1.GetCloudInstanceConfigAction) action_); + } + if (actionCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.spanner.executor.v1.ListCloudInstanceConfigsAction) action_); + } + if (actionCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.spanner.executor.v1.CreateCloudInstanceAction) action_); + } + if (actionCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.spanner.executor.v1.UpdateCloudInstanceAction) action_); + } + if (actionCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.spanner.executor.v1.DeleteCloudInstanceAction) action_); + } + if (actionCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.spanner.executor.v1.ListCloudInstancesAction) action_); + } + if (actionCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.spanner.executor.v1.GetCloudInstanceAction) action_); + } + if (actionCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.spanner.executor.v1.CreateCloudDatabaseAction) action_); + } + if (actionCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) action_); + } + if (actionCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.spanner.executor.v1.DropCloudDatabaseAction) action_); + } + if (actionCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.spanner.executor.v1.ListCloudDatabasesAction) action_); + } + if (actionCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction) action_); + } + if (actionCase_ == 16) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 16, (com.google.spanner.executor.v1.RestoreCloudDatabaseAction) action_); + } + if (actionCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, (com.google.spanner.executor.v1.GetCloudDatabaseAction) action_); + } + if (actionCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, (com.google.spanner.executor.v1.CreateCloudBackupAction) action_); + } + if (actionCase_ == 19) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, (com.google.spanner.executor.v1.CopyCloudBackupAction) action_); + } + if (actionCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (com.google.spanner.executor.v1.GetCloudBackupAction) action_); + } + if (actionCase_ == 21) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 21, (com.google.spanner.executor.v1.UpdateCloudBackupAction) action_); + } + if (actionCase_ == 22) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 22, (com.google.spanner.executor.v1.DeleteCloudBackupAction) action_); + } + if (actionCase_ == 23) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 23, (com.google.spanner.executor.v1.ListCloudBackupsAction) action_); + } + if (actionCase_ == 24) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 24, (com.google.spanner.executor.v1.ListCloudBackupOperationsAction) action_); + } + if (actionCase_ == 25) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 25, (com.google.spanner.executor.v1.GetOperationAction) action_); + } + if (actionCase_ == 26) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 26, (com.google.spanner.executor.v1.CancelOperationAction) action_); + } + if (actionCase_ == 27) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 27, (com.google.spanner.executor.v1.UpdateCloudDatabaseAction) action_); + } + if (actionCase_ == 28) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 28, (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_); + } + 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.executor.v1.AdminAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.AdminAction other = + (com.google.spanner.executor.v1.AdminAction) obj; + + if (!getActionCase().equals(other.getActionCase())) return false; + switch (actionCase_) { + case 1: + if (!getCreateUserInstanceConfig().equals(other.getCreateUserInstanceConfig())) + return false; + break; + case 2: + if (!getUpdateUserInstanceConfig().equals(other.getUpdateUserInstanceConfig())) + return false; + break; + case 3: + if (!getDeleteUserInstanceConfig().equals(other.getDeleteUserInstanceConfig())) + return false; + break; + case 4: + if (!getGetCloudInstanceConfig().equals(other.getGetCloudInstanceConfig())) return false; + break; + case 5: + if (!getListInstanceConfigs().equals(other.getListInstanceConfigs())) return false; + break; + case 6: + if (!getCreateCloudInstance().equals(other.getCreateCloudInstance())) return false; + break; + case 7: + if (!getUpdateCloudInstance().equals(other.getUpdateCloudInstance())) return false; + break; + case 8: + if (!getDeleteCloudInstance().equals(other.getDeleteCloudInstance())) return false; + break; + case 9: + if (!getListCloudInstances().equals(other.getListCloudInstances())) return false; + break; + case 10: + if (!getGetCloudInstance().equals(other.getGetCloudInstance())) return false; + break; + case 11: + if (!getCreateCloudDatabase().equals(other.getCreateCloudDatabase())) return false; + break; + case 12: + if (!getUpdateCloudDatabaseDdl().equals(other.getUpdateCloudDatabaseDdl())) return false; + break; + case 27: + if (!getUpdateCloudDatabase().equals(other.getUpdateCloudDatabase())) return false; + break; + case 13: + if (!getDropCloudDatabase().equals(other.getDropCloudDatabase())) return false; + break; + case 14: + if (!getListCloudDatabases().equals(other.getListCloudDatabases())) return false; + break; + case 15: + if (!getListCloudDatabaseOperations().equals(other.getListCloudDatabaseOperations())) + return false; + break; + case 16: + if (!getRestoreCloudDatabase().equals(other.getRestoreCloudDatabase())) return false; + break; + case 17: + if (!getGetCloudDatabase().equals(other.getGetCloudDatabase())) return false; + break; + case 18: + if (!getCreateCloudBackup().equals(other.getCreateCloudBackup())) return false; + break; + case 19: + if (!getCopyCloudBackup().equals(other.getCopyCloudBackup())) return false; + break; + case 20: + if (!getGetCloudBackup().equals(other.getGetCloudBackup())) return false; + break; + case 21: + if (!getUpdateCloudBackup().equals(other.getUpdateCloudBackup())) return false; + break; + case 22: + if (!getDeleteCloudBackup().equals(other.getDeleteCloudBackup())) return false; + break; + case 23: + if (!getListCloudBackups().equals(other.getListCloudBackups())) return false; + break; + case 24: + if (!getListCloudBackupOperations().equals(other.getListCloudBackupOperations())) + return false; + break; + case 25: + if (!getGetOperation().equals(other.getGetOperation())) return false; + break; + case 26: + if (!getCancelOperation().equals(other.getCancelOperation())) return false; + break; + case 28: + if (!getReconfigureCloudDatabase().equals(other.getReconfigureCloudDatabase())) + return false; + break; + case 0: + default: + } + 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(); + switch (actionCase_) { + case 1: + hash = (37 * hash) + CREATE_USER_INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCreateUserInstanceConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + UPDATE_USER_INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getUpdateUserInstanceConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + DELETE_USER_INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDeleteUserInstanceConfig().hashCode(); + break; + case 4: + hash = (37 * hash) + GET_CLOUD_INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getGetCloudInstanceConfig().hashCode(); + break; + case 5: + hash = (37 * hash) + LIST_INSTANCE_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getListInstanceConfigs().hashCode(); + break; + case 6: + hash = (37 * hash) + CREATE_CLOUD_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getCreateCloudInstance().hashCode(); + break; + case 7: + hash = (37 * hash) + UPDATE_CLOUD_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getUpdateCloudInstance().hashCode(); + break; + case 8: + hash = (37 * hash) + DELETE_CLOUD_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getDeleteCloudInstance().hashCode(); + break; + case 9: + hash = (37 * hash) + LIST_CLOUD_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getListCloudInstances().hashCode(); + break; + case 10: + hash = (37 * hash) + GET_CLOUD_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getGetCloudInstance().hashCode(); + break; + case 11: + hash = (37 * hash) + CREATE_CLOUD_DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getCreateCloudDatabase().hashCode(); + break; + case 12: + hash = (37 * hash) + UPDATE_CLOUD_DATABASE_DDL_FIELD_NUMBER; + hash = (53 * hash) + getUpdateCloudDatabaseDdl().hashCode(); + break; + case 27: + hash = (37 * hash) + UPDATE_CLOUD_DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getUpdateCloudDatabase().hashCode(); + break; + case 13: + hash = (37 * hash) + DROP_CLOUD_DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDropCloudDatabase().hashCode(); + break; + case 14: + hash = (37 * hash) + LIST_CLOUD_DATABASES_FIELD_NUMBER; + hash = (53 * hash) + getListCloudDatabases().hashCode(); + break; + case 15: + hash = (37 * hash) + LIST_CLOUD_DATABASE_OPERATIONS_FIELD_NUMBER; + hash = (53 * hash) + getListCloudDatabaseOperations().hashCode(); + break; + case 16: + hash = (37 * hash) + RESTORE_CLOUD_DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getRestoreCloudDatabase().hashCode(); + break; + case 17: + hash = (37 * hash) + GET_CLOUD_DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getGetCloudDatabase().hashCode(); + break; + case 18: + hash = (37 * hash) + CREATE_CLOUD_BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getCreateCloudBackup().hashCode(); + break; + case 19: + hash = (37 * hash) + COPY_CLOUD_BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getCopyCloudBackup().hashCode(); + break; + case 20: + hash = (37 * hash) + GET_CLOUD_BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getGetCloudBackup().hashCode(); + break; + case 21: + hash = (37 * hash) + UPDATE_CLOUD_BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getUpdateCloudBackup().hashCode(); + break; + case 22: + hash = (37 * hash) + DELETE_CLOUD_BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getDeleteCloudBackup().hashCode(); + break; + case 23: + hash = (37 * hash) + LIST_CLOUD_BACKUPS_FIELD_NUMBER; + hash = (53 * hash) + getListCloudBackups().hashCode(); + break; + case 24: + hash = (37 * hash) + LIST_CLOUD_BACKUP_OPERATIONS_FIELD_NUMBER; + hash = (53 * hash) + getListCloudBackupOperations().hashCode(); + break; + case 25: + hash = (37 * hash) + GET_OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getGetOperation().hashCode(); + break; + case 26: + hash = (37 * hash) + CANCEL_OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getCancelOperation().hashCode(); + break; + case 28: + hash = (37 * hash) + RECONFIGURE_CLOUD_DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getReconfigureCloudDatabase().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.AdminAction parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.AdminAction 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.executor.v1.AdminAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.AdminAction 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.executor.v1.AdminAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.AdminAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.AdminAction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.AdminAction 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.executor.v1.AdminAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.AdminAction 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.executor.v1.AdminAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.AdminAction 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.executor.v1.AdminAction 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; + } + /** + * + * + *
+   * AdminAction defines all the cloud spanner admin actions, including
+   * instance/database admin ops, backup ops and operation actions.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.AdminAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.AdminAction) + com.google.spanner.executor.v1.AdminActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdminAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdminAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.AdminAction.class, + com.google.spanner.executor.v1.AdminAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.AdminAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (createUserInstanceConfigBuilder_ != null) { + createUserInstanceConfigBuilder_.clear(); + } + if (updateUserInstanceConfigBuilder_ != null) { + updateUserInstanceConfigBuilder_.clear(); + } + if (deleteUserInstanceConfigBuilder_ != null) { + deleteUserInstanceConfigBuilder_.clear(); + } + if (getCloudInstanceConfigBuilder_ != null) { + getCloudInstanceConfigBuilder_.clear(); + } + if (listInstanceConfigsBuilder_ != null) { + listInstanceConfigsBuilder_.clear(); + } + if (createCloudInstanceBuilder_ != null) { + createCloudInstanceBuilder_.clear(); + } + if (updateCloudInstanceBuilder_ != null) { + updateCloudInstanceBuilder_.clear(); + } + if (deleteCloudInstanceBuilder_ != null) { + deleteCloudInstanceBuilder_.clear(); + } + if (listCloudInstancesBuilder_ != null) { + listCloudInstancesBuilder_.clear(); + } + if (getCloudInstanceBuilder_ != null) { + getCloudInstanceBuilder_.clear(); + } + if (createCloudDatabaseBuilder_ != null) { + createCloudDatabaseBuilder_.clear(); + } + if (updateCloudDatabaseDdlBuilder_ != null) { + updateCloudDatabaseDdlBuilder_.clear(); + } + if (updateCloudDatabaseBuilder_ != null) { + updateCloudDatabaseBuilder_.clear(); + } + if (dropCloudDatabaseBuilder_ != null) { + dropCloudDatabaseBuilder_.clear(); + } + if (listCloudDatabasesBuilder_ != null) { + listCloudDatabasesBuilder_.clear(); + } + if (listCloudDatabaseOperationsBuilder_ != null) { + listCloudDatabaseOperationsBuilder_.clear(); + } + if (restoreCloudDatabaseBuilder_ != null) { + restoreCloudDatabaseBuilder_.clear(); + } + if (getCloudDatabaseBuilder_ != null) { + getCloudDatabaseBuilder_.clear(); + } + if (createCloudBackupBuilder_ != null) { + createCloudBackupBuilder_.clear(); + } + if (copyCloudBackupBuilder_ != null) { + copyCloudBackupBuilder_.clear(); + } + if (getCloudBackupBuilder_ != null) { + getCloudBackupBuilder_.clear(); + } + if (updateCloudBackupBuilder_ != null) { + updateCloudBackupBuilder_.clear(); + } + if (deleteCloudBackupBuilder_ != null) { + deleteCloudBackupBuilder_.clear(); + } + if (listCloudBackupsBuilder_ != null) { + listCloudBackupsBuilder_.clear(); + } + if (listCloudBackupOperationsBuilder_ != null) { + listCloudBackupOperationsBuilder_.clear(); + } + if (getOperationBuilder_ != null) { + getOperationBuilder_.clear(); + } + if (cancelOperationBuilder_ != null) { + cancelOperationBuilder_.clear(); + } + if (reconfigureCloudDatabaseBuilder_ != null) { + reconfigureCloudDatabaseBuilder_.clear(); + } + actionCase_ = 0; + action_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdminAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.AdminAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.AdminAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.AdminAction build() { + com.google.spanner.executor.v1.AdminAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.AdminAction buildPartial() { + com.google.spanner.executor.v1.AdminAction result = + new com.google.spanner.executor.v1.AdminAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.AdminAction result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.spanner.executor.v1.AdminAction result) { + result.actionCase_ = actionCase_; + result.action_ = this.action_; + if (actionCase_ == 1 && createUserInstanceConfigBuilder_ != null) { + result.action_ = createUserInstanceConfigBuilder_.build(); + } + if (actionCase_ == 2 && updateUserInstanceConfigBuilder_ != null) { + result.action_ = updateUserInstanceConfigBuilder_.build(); + } + if (actionCase_ == 3 && deleteUserInstanceConfigBuilder_ != null) { + result.action_ = deleteUserInstanceConfigBuilder_.build(); + } + if (actionCase_ == 4 && getCloudInstanceConfigBuilder_ != null) { + result.action_ = getCloudInstanceConfigBuilder_.build(); + } + if (actionCase_ == 5 && listInstanceConfigsBuilder_ != null) { + result.action_ = listInstanceConfigsBuilder_.build(); + } + if (actionCase_ == 6 && createCloudInstanceBuilder_ != null) { + result.action_ = createCloudInstanceBuilder_.build(); + } + if (actionCase_ == 7 && updateCloudInstanceBuilder_ != null) { + result.action_ = updateCloudInstanceBuilder_.build(); + } + if (actionCase_ == 8 && deleteCloudInstanceBuilder_ != null) { + result.action_ = deleteCloudInstanceBuilder_.build(); + } + if (actionCase_ == 9 && listCloudInstancesBuilder_ != null) { + result.action_ = listCloudInstancesBuilder_.build(); + } + if (actionCase_ == 10 && getCloudInstanceBuilder_ != null) { + result.action_ = getCloudInstanceBuilder_.build(); + } + if (actionCase_ == 11 && createCloudDatabaseBuilder_ != null) { + result.action_ = createCloudDatabaseBuilder_.build(); + } + if (actionCase_ == 12 && updateCloudDatabaseDdlBuilder_ != null) { + result.action_ = updateCloudDatabaseDdlBuilder_.build(); + } + if (actionCase_ == 27 && updateCloudDatabaseBuilder_ != null) { + result.action_ = updateCloudDatabaseBuilder_.build(); + } + if (actionCase_ == 13 && dropCloudDatabaseBuilder_ != null) { + result.action_ = dropCloudDatabaseBuilder_.build(); + } + if (actionCase_ == 14 && listCloudDatabasesBuilder_ != null) { + result.action_ = listCloudDatabasesBuilder_.build(); + } + if (actionCase_ == 15 && listCloudDatabaseOperationsBuilder_ != null) { + result.action_ = listCloudDatabaseOperationsBuilder_.build(); + } + if (actionCase_ == 16 && restoreCloudDatabaseBuilder_ != null) { + result.action_ = restoreCloudDatabaseBuilder_.build(); + } + if (actionCase_ == 17 && getCloudDatabaseBuilder_ != null) { + result.action_ = getCloudDatabaseBuilder_.build(); + } + if (actionCase_ == 18 && createCloudBackupBuilder_ != null) { + result.action_ = createCloudBackupBuilder_.build(); + } + if (actionCase_ == 19 && copyCloudBackupBuilder_ != null) { + result.action_ = copyCloudBackupBuilder_.build(); + } + if (actionCase_ == 20 && getCloudBackupBuilder_ != null) { + result.action_ = getCloudBackupBuilder_.build(); + } + if (actionCase_ == 21 && updateCloudBackupBuilder_ != null) { + result.action_ = updateCloudBackupBuilder_.build(); + } + if (actionCase_ == 22 && deleteCloudBackupBuilder_ != null) { + result.action_ = deleteCloudBackupBuilder_.build(); + } + if (actionCase_ == 23 && listCloudBackupsBuilder_ != null) { + result.action_ = listCloudBackupsBuilder_.build(); + } + if (actionCase_ == 24 && listCloudBackupOperationsBuilder_ != null) { + result.action_ = listCloudBackupOperationsBuilder_.build(); + } + if (actionCase_ == 25 && getOperationBuilder_ != null) { + result.action_ = getOperationBuilder_.build(); + } + if (actionCase_ == 26 && cancelOperationBuilder_ != null) { + result.action_ = cancelOperationBuilder_.build(); + } + if (actionCase_ == 28 && reconfigureCloudDatabaseBuilder_ != null) { + result.action_ = reconfigureCloudDatabaseBuilder_.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.executor.v1.AdminAction) { + return mergeFrom((com.google.spanner.executor.v1.AdminAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.AdminAction other) { + if (other == com.google.spanner.executor.v1.AdminAction.getDefaultInstance()) return this; + switch (other.getActionCase()) { + case CREATE_USER_INSTANCE_CONFIG: + { + mergeCreateUserInstanceConfig(other.getCreateUserInstanceConfig()); + break; + } + case UPDATE_USER_INSTANCE_CONFIG: + { + mergeUpdateUserInstanceConfig(other.getUpdateUserInstanceConfig()); + break; + } + case DELETE_USER_INSTANCE_CONFIG: + { + mergeDeleteUserInstanceConfig(other.getDeleteUserInstanceConfig()); + break; + } + case GET_CLOUD_INSTANCE_CONFIG: + { + mergeGetCloudInstanceConfig(other.getGetCloudInstanceConfig()); + break; + } + case LIST_INSTANCE_CONFIGS: + { + mergeListInstanceConfigs(other.getListInstanceConfigs()); + break; + } + case CREATE_CLOUD_INSTANCE: + { + mergeCreateCloudInstance(other.getCreateCloudInstance()); + break; + } + case UPDATE_CLOUD_INSTANCE: + { + mergeUpdateCloudInstance(other.getUpdateCloudInstance()); + break; + } + case DELETE_CLOUD_INSTANCE: + { + mergeDeleteCloudInstance(other.getDeleteCloudInstance()); + break; + } + case LIST_CLOUD_INSTANCES: + { + mergeListCloudInstances(other.getListCloudInstances()); + break; + } + case GET_CLOUD_INSTANCE: + { + mergeGetCloudInstance(other.getGetCloudInstance()); + break; + } + case CREATE_CLOUD_DATABASE: + { + mergeCreateCloudDatabase(other.getCreateCloudDatabase()); + break; + } + case UPDATE_CLOUD_DATABASE_DDL: + { + mergeUpdateCloudDatabaseDdl(other.getUpdateCloudDatabaseDdl()); + break; + } + case UPDATE_CLOUD_DATABASE: + { + mergeUpdateCloudDatabase(other.getUpdateCloudDatabase()); + break; + } + case DROP_CLOUD_DATABASE: + { + mergeDropCloudDatabase(other.getDropCloudDatabase()); + break; + } + case LIST_CLOUD_DATABASES: + { + mergeListCloudDatabases(other.getListCloudDatabases()); + break; + } + case LIST_CLOUD_DATABASE_OPERATIONS: + { + mergeListCloudDatabaseOperations(other.getListCloudDatabaseOperations()); + break; + } + case RESTORE_CLOUD_DATABASE: + { + mergeRestoreCloudDatabase(other.getRestoreCloudDatabase()); + break; + } + case GET_CLOUD_DATABASE: + { + mergeGetCloudDatabase(other.getGetCloudDatabase()); + break; + } + case CREATE_CLOUD_BACKUP: + { + mergeCreateCloudBackup(other.getCreateCloudBackup()); + break; + } + case COPY_CLOUD_BACKUP: + { + mergeCopyCloudBackup(other.getCopyCloudBackup()); + break; + } + case GET_CLOUD_BACKUP: + { + mergeGetCloudBackup(other.getGetCloudBackup()); + break; + } + case UPDATE_CLOUD_BACKUP: + { + mergeUpdateCloudBackup(other.getUpdateCloudBackup()); + break; + } + case DELETE_CLOUD_BACKUP: + { + mergeDeleteCloudBackup(other.getDeleteCloudBackup()); + break; + } + case LIST_CLOUD_BACKUPS: + { + mergeListCloudBackups(other.getListCloudBackups()); + break; + } + case LIST_CLOUD_BACKUP_OPERATIONS: + { + mergeListCloudBackupOperations(other.getListCloudBackupOperations()); + break; + } + case GET_OPERATION: + { + mergeGetOperation(other.getGetOperation()); + break; + } + case CANCEL_OPERATION: + { + mergeCancelOperation(other.getCancelOperation()); + break; + } + case RECONFIGURE_CLOUD_DATABASE: + { + mergeReconfigureCloudDatabase(other.getReconfigureCloudDatabase()); + break; + } + case ACTION_NOT_SET: + { + break; + } + } + 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: + { + input.readMessage( + getCreateUserInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getUpdateUserInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getDeleteUserInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + getGetCloudInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + getListInstanceConfigsFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + getCreateCloudInstanceFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + getUpdateCloudInstanceFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + getDeleteCloudInstanceFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + getListCloudInstancesFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage( + getGetCloudInstanceFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + getCreateCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage( + getUpdateCloudDatabaseDdlFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage( + getDropCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage( + getListCloudDatabasesFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 14; + break; + } // case 114 + case 122: + { + input.readMessage( + getListCloudDatabaseOperationsFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 15; + break; + } // case 122 + case 130: + { + input.readMessage( + getRestoreCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 16; + break; + } // case 130 + case 138: + { + input.readMessage( + getGetCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 17; + break; + } // case 138 + case 146: + { + input.readMessage( + getCreateCloudBackupFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 18; + break; + } // case 146 + case 154: + { + input.readMessage(getCopyCloudBackupFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 19; + break; + } // case 154 + case 162: + { + input.readMessage(getGetCloudBackupFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 20; + break; + } // case 162 + case 170: + { + input.readMessage( + getUpdateCloudBackupFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 21; + break; + } // case 170 + case 178: + { + input.readMessage( + getDeleteCloudBackupFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 22; + break; + } // case 178 + case 186: + { + input.readMessage( + getListCloudBackupsFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 23; + break; + } // case 186 + case 194: + { + input.readMessage( + getListCloudBackupOperationsFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 24; + break; + } // case 194 + case 202: + { + input.readMessage(getGetOperationFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 25; + break; + } // case 202 + case 210: + { + input.readMessage(getCancelOperationFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 26; + break; + } // case 210 + case 218: + { + input.readMessage( + getUpdateCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 27; + break; + } // case 218 + case 226: + { + input.readMessage( + getReconfigureCloudDatabaseFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 28; + break; + } // case 226 + 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 actionCase_ = 0; + private java.lang.Object action_; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public Builder clearAction() { + actionCase_ = 0; + action_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CreateUserInstanceConfigAction, + com.google.spanner.executor.v1.CreateUserInstanceConfigAction.Builder, + com.google.spanner.executor.v1.CreateUserInstanceConfigActionOrBuilder> + createUserInstanceConfigBuilder_; + /** + * + * + *
+     * Action that creates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + * + * @return Whether the createUserInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasCreateUserInstanceConfig() { + return actionCase_ == 1; + } + /** + * + * + *
+     * Action that creates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + * + * @return The createUserInstanceConfig. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateUserInstanceConfigAction + getCreateUserInstanceConfig() { + if (createUserInstanceConfigBuilder_ == null) { + if (actionCase_ == 1) { + return (com.google.spanner.executor.v1.CreateUserInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.CreateUserInstanceConfigAction.getDefaultInstance(); + } else { + if (actionCase_ == 1) { + return createUserInstanceConfigBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.CreateUserInstanceConfigAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that creates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + */ + public Builder setCreateUserInstanceConfig( + com.google.spanner.executor.v1.CreateUserInstanceConfigAction value) { + if (createUserInstanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + createUserInstanceConfigBuilder_.setMessage(value); + } + actionCase_ = 1; + return this; + } + /** + * + * + *
+     * Action that creates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + */ + public Builder setCreateUserInstanceConfig( + com.google.spanner.executor.v1.CreateUserInstanceConfigAction.Builder builderForValue) { + if (createUserInstanceConfigBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + createUserInstanceConfigBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 1; + return this; + } + /** + * + * + *
+     * Action that creates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + */ + public Builder mergeCreateUserInstanceConfig( + com.google.spanner.executor.v1.CreateUserInstanceConfigAction value) { + if (createUserInstanceConfigBuilder_ == null) { + if (actionCase_ == 1 + && action_ + != com.google.spanner.executor.v1.CreateUserInstanceConfigAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.CreateUserInstanceConfigAction.newBuilder( + (com.google.spanner.executor.v1.CreateUserInstanceConfigAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 1) { + createUserInstanceConfigBuilder_.mergeFrom(value); + } else { + createUserInstanceConfigBuilder_.setMessage(value); + } + } + actionCase_ = 1; + return this; + } + /** + * + * + *
+     * Action that creates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + */ + public Builder clearCreateUserInstanceConfig() { + if (createUserInstanceConfigBuilder_ == null) { + if (actionCase_ == 1) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 1) { + actionCase_ = 0; + action_ = null; + } + createUserInstanceConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that creates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + */ + public com.google.spanner.executor.v1.CreateUserInstanceConfigAction.Builder + getCreateUserInstanceConfigBuilder() { + return getCreateUserInstanceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that creates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateUserInstanceConfigActionOrBuilder + getCreateUserInstanceConfigOrBuilder() { + if ((actionCase_ == 1) && (createUserInstanceConfigBuilder_ != null)) { + return createUserInstanceConfigBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 1) { + return (com.google.spanner.executor.v1.CreateUserInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.CreateUserInstanceConfigAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that creates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CreateUserInstanceConfigAction, + com.google.spanner.executor.v1.CreateUserInstanceConfigAction.Builder, + com.google.spanner.executor.v1.CreateUserInstanceConfigActionOrBuilder> + getCreateUserInstanceConfigFieldBuilder() { + if (createUserInstanceConfigBuilder_ == null) { + if (!(actionCase_ == 1)) { + action_ = + com.google.spanner.executor.v1.CreateUserInstanceConfigAction.getDefaultInstance(); + } + createUserInstanceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CreateUserInstanceConfigAction, + com.google.spanner.executor.v1.CreateUserInstanceConfigAction.Builder, + com.google.spanner.executor.v1.CreateUserInstanceConfigActionOrBuilder>( + (com.google.spanner.executor.v1.CreateUserInstanceConfigAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 1; + onChanged(); + return createUserInstanceConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction, + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.Builder, + com.google.spanner.executor.v1.UpdateUserInstanceConfigActionOrBuilder> + updateUserInstanceConfigBuilder_; + /** + * + * + *
+     * Action that updates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + * + * @return Whether the updateUserInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasUpdateUserInstanceConfig() { + return actionCase_ == 2; + } + /** + * + * + *
+     * Action that updates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + * + * @return The updateUserInstanceConfig. + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateUserInstanceConfigAction + getUpdateUserInstanceConfig() { + if (updateUserInstanceConfigBuilder_ == null) { + if (actionCase_ == 2) { + return (com.google.spanner.executor.v1.UpdateUserInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.getDefaultInstance(); + } else { + if (actionCase_ == 2) { + return updateUserInstanceConfigBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that updates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + */ + public Builder setUpdateUserInstanceConfig( + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction value) { + if (updateUserInstanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + updateUserInstanceConfigBuilder_.setMessage(value); + } + actionCase_ = 2; + return this; + } + /** + * + * + *
+     * Action that updates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + */ + public Builder setUpdateUserInstanceConfig( + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.Builder builderForValue) { + if (updateUserInstanceConfigBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + updateUserInstanceConfigBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 2; + return this; + } + /** + * + * + *
+     * Action that updates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + */ + public Builder mergeUpdateUserInstanceConfig( + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction value) { + if (updateUserInstanceConfigBuilder_ == null) { + if (actionCase_ == 2 + && action_ + != com.google.spanner.executor.v1.UpdateUserInstanceConfigAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.newBuilder( + (com.google.spanner.executor.v1.UpdateUserInstanceConfigAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 2) { + updateUserInstanceConfigBuilder_.mergeFrom(value); + } else { + updateUserInstanceConfigBuilder_.setMessage(value); + } + } + actionCase_ = 2; + return this; + } + /** + * + * + *
+     * Action that updates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + */ + public Builder clearUpdateUserInstanceConfig() { + if (updateUserInstanceConfigBuilder_ == null) { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + } + updateUserInstanceConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that updates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + */ + public com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.Builder + getUpdateUserInstanceConfigBuilder() { + return getUpdateUserInstanceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that updates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateUserInstanceConfigActionOrBuilder + getUpdateUserInstanceConfigOrBuilder() { + if ((actionCase_ == 2) && (updateUserInstanceConfigBuilder_ != null)) { + return updateUserInstanceConfigBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 2) { + return (com.google.spanner.executor.v1.UpdateUserInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that updates a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction, + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.Builder, + com.google.spanner.executor.v1.UpdateUserInstanceConfigActionOrBuilder> + getUpdateUserInstanceConfigFieldBuilder() { + if (updateUserInstanceConfigBuilder_ == null) { + if (!(actionCase_ == 2)) { + action_ = + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.getDefaultInstance(); + } + updateUserInstanceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction, + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.Builder, + com.google.spanner.executor.v1.UpdateUserInstanceConfigActionOrBuilder>( + (com.google.spanner.executor.v1.UpdateUserInstanceConfigAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 2; + onChanged(); + return updateUserInstanceConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction, + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.Builder, + com.google.spanner.executor.v1.DeleteUserInstanceConfigActionOrBuilder> + deleteUserInstanceConfigBuilder_; + /** + * + * + *
+     * Action that deletes a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + * + * @return Whether the deleteUserInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasDeleteUserInstanceConfig() { + return actionCase_ == 3; + } + /** + * + * + *
+     * Action that deletes a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + * + * @return The deleteUserInstanceConfig. + */ + @java.lang.Override + public com.google.spanner.executor.v1.DeleteUserInstanceConfigAction + getDeleteUserInstanceConfig() { + if (deleteUserInstanceConfigBuilder_ == null) { + if (actionCase_ == 3) { + return (com.google.spanner.executor.v1.DeleteUserInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.getDefaultInstance(); + } else { + if (actionCase_ == 3) { + return deleteUserInstanceConfigBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that deletes a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + */ + public Builder setDeleteUserInstanceConfig( + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction value) { + if (deleteUserInstanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + deleteUserInstanceConfigBuilder_.setMessage(value); + } + actionCase_ = 3; + return this; + } + /** + * + * + *
+     * Action that deletes a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + */ + public Builder setDeleteUserInstanceConfig( + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.Builder builderForValue) { + if (deleteUserInstanceConfigBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + deleteUserInstanceConfigBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 3; + return this; + } + /** + * + * + *
+     * Action that deletes a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + */ + public Builder mergeDeleteUserInstanceConfig( + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction value) { + if (deleteUserInstanceConfigBuilder_ == null) { + if (actionCase_ == 3 + && action_ + != com.google.spanner.executor.v1.DeleteUserInstanceConfigAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.newBuilder( + (com.google.spanner.executor.v1.DeleteUserInstanceConfigAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 3) { + deleteUserInstanceConfigBuilder_.mergeFrom(value); + } else { + deleteUserInstanceConfigBuilder_.setMessage(value); + } + } + actionCase_ = 3; + return this; + } + /** + * + * + *
+     * Action that deletes a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + */ + public Builder clearDeleteUserInstanceConfig() { + if (deleteUserInstanceConfigBuilder_ == null) { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + } + deleteUserInstanceConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that deletes a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + */ + public com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.Builder + getDeleteUserInstanceConfigBuilder() { + return getDeleteUserInstanceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that deletes a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.DeleteUserInstanceConfigActionOrBuilder + getDeleteUserInstanceConfigOrBuilder() { + if ((actionCase_ == 3) && (deleteUserInstanceConfigBuilder_ != null)) { + return deleteUserInstanceConfigBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 3) { + return (com.google.spanner.executor.v1.DeleteUserInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that deletes a user instance config.
+     * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction, + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.Builder, + com.google.spanner.executor.v1.DeleteUserInstanceConfigActionOrBuilder> + getDeleteUserInstanceConfigFieldBuilder() { + if (deleteUserInstanceConfigBuilder_ == null) { + if (!(actionCase_ == 3)) { + action_ = + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.getDefaultInstance(); + } + deleteUserInstanceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction, + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.Builder, + com.google.spanner.executor.v1.DeleteUserInstanceConfigActionOrBuilder>( + (com.google.spanner.executor.v1.DeleteUserInstanceConfigAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 3; + onChanged(); + return deleteUserInstanceConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetCloudInstanceConfigAction, + com.google.spanner.executor.v1.GetCloudInstanceConfigAction.Builder, + com.google.spanner.executor.v1.GetCloudInstanceConfigActionOrBuilder> + getCloudInstanceConfigBuilder_; + /** + * + * + *
+     * Action that gets a user instance config.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + * + * @return Whether the getCloudInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasGetCloudInstanceConfig() { + return actionCase_ == 4; + } + /** + * + * + *
+     * Action that gets a user instance config.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + * + * @return The getCloudInstanceConfig. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceConfigAction getGetCloudInstanceConfig() { + if (getCloudInstanceConfigBuilder_ == null) { + if (actionCase_ == 4) { + return (com.google.spanner.executor.v1.GetCloudInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.GetCloudInstanceConfigAction.getDefaultInstance(); + } else { + if (actionCase_ == 4) { + return getCloudInstanceConfigBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.GetCloudInstanceConfigAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that gets a user instance config.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + */ + public Builder setGetCloudInstanceConfig( + com.google.spanner.executor.v1.GetCloudInstanceConfigAction value) { + if (getCloudInstanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + getCloudInstanceConfigBuilder_.setMessage(value); + } + actionCase_ = 4; + return this; + } + /** + * + * + *
+     * Action that gets a user instance config.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + */ + public Builder setGetCloudInstanceConfig( + com.google.spanner.executor.v1.GetCloudInstanceConfigAction.Builder builderForValue) { + if (getCloudInstanceConfigBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + getCloudInstanceConfigBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 4; + return this; + } + /** + * + * + *
+     * Action that gets a user instance config.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + */ + public Builder mergeGetCloudInstanceConfig( + com.google.spanner.executor.v1.GetCloudInstanceConfigAction value) { + if (getCloudInstanceConfigBuilder_ == null) { + if (actionCase_ == 4 + && action_ + != com.google.spanner.executor.v1.GetCloudInstanceConfigAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.GetCloudInstanceConfigAction.newBuilder( + (com.google.spanner.executor.v1.GetCloudInstanceConfigAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 4) { + getCloudInstanceConfigBuilder_.mergeFrom(value); + } else { + getCloudInstanceConfigBuilder_.setMessage(value); + } + } + actionCase_ = 4; + return this; + } + /** + * + * + *
+     * Action that gets a user instance config.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + */ + public Builder clearGetCloudInstanceConfig() { + if (getCloudInstanceConfigBuilder_ == null) { + if (actionCase_ == 4) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 4) { + actionCase_ = 0; + action_ = null; + } + getCloudInstanceConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that gets a user instance config.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + */ + public com.google.spanner.executor.v1.GetCloudInstanceConfigAction.Builder + getGetCloudInstanceConfigBuilder() { + return getGetCloudInstanceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that gets a user instance config.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceConfigActionOrBuilder + getGetCloudInstanceConfigOrBuilder() { + if ((actionCase_ == 4) && (getCloudInstanceConfigBuilder_ != null)) { + return getCloudInstanceConfigBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 4) { + return (com.google.spanner.executor.v1.GetCloudInstanceConfigAction) action_; + } + return com.google.spanner.executor.v1.GetCloudInstanceConfigAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that gets a user instance config.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetCloudInstanceConfigAction, + com.google.spanner.executor.v1.GetCloudInstanceConfigAction.Builder, + com.google.spanner.executor.v1.GetCloudInstanceConfigActionOrBuilder> + getGetCloudInstanceConfigFieldBuilder() { + if (getCloudInstanceConfigBuilder_ == null) { + if (!(actionCase_ == 4)) { + action_ = + com.google.spanner.executor.v1.GetCloudInstanceConfigAction.getDefaultInstance(); + } + getCloudInstanceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetCloudInstanceConfigAction, + com.google.spanner.executor.v1.GetCloudInstanceConfigAction.Builder, + com.google.spanner.executor.v1.GetCloudInstanceConfigActionOrBuilder>( + (com.google.spanner.executor.v1.GetCloudInstanceConfigAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 4; + onChanged(); + return getCloudInstanceConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction, + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.Builder, + com.google.spanner.executor.v1.ListCloudInstanceConfigsActionOrBuilder> + listInstanceConfigsBuilder_; + /** + * + * + *
+     * Action that lists user instance configs.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + * + * @return Whether the listInstanceConfigs field is set. + */ + @java.lang.Override + public boolean hasListInstanceConfigs() { + return actionCase_ == 5; + } + /** + * + * + *
+     * Action that lists user instance configs.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + * + * @return The listInstanceConfigs. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstanceConfigsAction getListInstanceConfigs() { + if (listInstanceConfigsBuilder_ == null) { + if (actionCase_ == 5) { + return (com.google.spanner.executor.v1.ListCloudInstanceConfigsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.getDefaultInstance(); + } else { + if (actionCase_ == 5) { + return listInstanceConfigsBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that lists user instance configs.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + */ + public Builder setListInstanceConfigs( + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction value) { + if (listInstanceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + listInstanceConfigsBuilder_.setMessage(value); + } + actionCase_ = 5; + return this; + } + /** + * + * + *
+     * Action that lists user instance configs.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + */ + public Builder setListInstanceConfigs( + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.Builder builderForValue) { + if (listInstanceConfigsBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + listInstanceConfigsBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 5; + return this; + } + /** + * + * + *
+     * Action that lists user instance configs.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + */ + public Builder mergeListInstanceConfigs( + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction value) { + if (listInstanceConfigsBuilder_ == null) { + if (actionCase_ == 5 + && action_ + != com.google.spanner.executor.v1.ListCloudInstanceConfigsAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.newBuilder( + (com.google.spanner.executor.v1.ListCloudInstanceConfigsAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 5) { + listInstanceConfigsBuilder_.mergeFrom(value); + } else { + listInstanceConfigsBuilder_.setMessage(value); + } + } + actionCase_ = 5; + return this; + } + /** + * + * + *
+     * Action that lists user instance configs.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + */ + public Builder clearListInstanceConfigs() { + if (listInstanceConfigsBuilder_ == null) { + if (actionCase_ == 5) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 5) { + actionCase_ = 0; + action_ = null; + } + listInstanceConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that lists user instance configs.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + */ + public com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.Builder + getListInstanceConfigsBuilder() { + return getListInstanceConfigsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that lists user instance configs.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstanceConfigsActionOrBuilder + getListInstanceConfigsOrBuilder() { + if ((actionCase_ == 5) && (listInstanceConfigsBuilder_ != null)) { + return listInstanceConfigsBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 5) { + return (com.google.spanner.executor.v1.ListCloudInstanceConfigsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that lists user instance configs.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction, + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.Builder, + com.google.spanner.executor.v1.ListCloudInstanceConfigsActionOrBuilder> + getListInstanceConfigsFieldBuilder() { + if (listInstanceConfigsBuilder_ == null) { + if (!(actionCase_ == 5)) { + action_ = + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.getDefaultInstance(); + } + listInstanceConfigsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction, + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.Builder, + com.google.spanner.executor.v1.ListCloudInstanceConfigsActionOrBuilder>( + (com.google.spanner.executor.v1.ListCloudInstanceConfigsAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 5; + onChanged(); + return listInstanceConfigsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CreateCloudInstanceAction, + com.google.spanner.executor.v1.CreateCloudInstanceAction.Builder, + com.google.spanner.executor.v1.CreateCloudInstanceActionOrBuilder> + createCloudInstanceBuilder_; + /** + * + * + *
+     * Action that creates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + * + * @return Whether the createCloudInstance field is set. + */ + @java.lang.Override + public boolean hasCreateCloudInstance() { + return actionCase_ == 6; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + * + * @return The createCloudInstance. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudInstanceAction getCreateCloudInstance() { + if (createCloudInstanceBuilder_ == null) { + if (actionCase_ == 6) { + return (com.google.spanner.executor.v1.CreateCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.CreateCloudInstanceAction.getDefaultInstance(); + } else { + if (actionCase_ == 6) { + return createCloudInstanceBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.CreateCloudInstanceAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that creates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + */ + public Builder setCreateCloudInstance( + com.google.spanner.executor.v1.CreateCloudInstanceAction value) { + if (createCloudInstanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + createCloudInstanceBuilder_.setMessage(value); + } + actionCase_ = 6; + return this; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + */ + public Builder setCreateCloudInstance( + com.google.spanner.executor.v1.CreateCloudInstanceAction.Builder builderForValue) { + if (createCloudInstanceBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + createCloudInstanceBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 6; + return this; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + */ + public Builder mergeCreateCloudInstance( + com.google.spanner.executor.v1.CreateCloudInstanceAction value) { + if (createCloudInstanceBuilder_ == null) { + if (actionCase_ == 6 + && action_ + != com.google.spanner.executor.v1.CreateCloudInstanceAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.CreateCloudInstanceAction.newBuilder( + (com.google.spanner.executor.v1.CreateCloudInstanceAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 6) { + createCloudInstanceBuilder_.mergeFrom(value); + } else { + createCloudInstanceBuilder_.setMessage(value); + } + } + actionCase_ = 6; + return this; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + */ + public Builder clearCreateCloudInstance() { + if (createCloudInstanceBuilder_ == null) { + if (actionCase_ == 6) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 6) { + actionCase_ = 0; + action_ = null; + } + createCloudInstanceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + */ + public com.google.spanner.executor.v1.CreateCloudInstanceAction.Builder + getCreateCloudInstanceBuilder() { + return getCreateCloudInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that creates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudInstanceActionOrBuilder + getCreateCloudInstanceOrBuilder() { + if ((actionCase_ == 6) && (createCloudInstanceBuilder_ != null)) { + return createCloudInstanceBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 6) { + return (com.google.spanner.executor.v1.CreateCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.CreateCloudInstanceAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that creates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CreateCloudInstanceAction, + com.google.spanner.executor.v1.CreateCloudInstanceAction.Builder, + com.google.spanner.executor.v1.CreateCloudInstanceActionOrBuilder> + getCreateCloudInstanceFieldBuilder() { + if (createCloudInstanceBuilder_ == null) { + if (!(actionCase_ == 6)) { + action_ = com.google.spanner.executor.v1.CreateCloudInstanceAction.getDefaultInstance(); + } + createCloudInstanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CreateCloudInstanceAction, + com.google.spanner.executor.v1.CreateCloudInstanceAction.Builder, + com.google.spanner.executor.v1.CreateCloudInstanceActionOrBuilder>( + (com.google.spanner.executor.v1.CreateCloudInstanceAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 6; + onChanged(); + return createCloudInstanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateCloudInstanceAction, + com.google.spanner.executor.v1.UpdateCloudInstanceAction.Builder, + com.google.spanner.executor.v1.UpdateCloudInstanceActionOrBuilder> + updateCloudInstanceBuilder_; + /** + * + * + *
+     * Action that updates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + * + * @return Whether the updateCloudInstance field is set. + */ + @java.lang.Override + public boolean hasUpdateCloudInstance() { + return actionCase_ == 7; + } + /** + * + * + *
+     * Action that updates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + * + * @return The updateCloudInstance. + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudInstanceAction getUpdateCloudInstance() { + if (updateCloudInstanceBuilder_ == null) { + if (actionCase_ == 7) { + return (com.google.spanner.executor.v1.UpdateCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudInstanceAction.getDefaultInstance(); + } else { + if (actionCase_ == 7) { + return updateCloudInstanceBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.UpdateCloudInstanceAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that updates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + */ + public Builder setUpdateCloudInstance( + com.google.spanner.executor.v1.UpdateCloudInstanceAction value) { + if (updateCloudInstanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + updateCloudInstanceBuilder_.setMessage(value); + } + actionCase_ = 7; + return this; + } + /** + * + * + *
+     * Action that updates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + */ + public Builder setUpdateCloudInstance( + com.google.spanner.executor.v1.UpdateCloudInstanceAction.Builder builderForValue) { + if (updateCloudInstanceBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + updateCloudInstanceBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 7; + return this; + } + /** + * + * + *
+     * Action that updates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + */ + public Builder mergeUpdateCloudInstance( + com.google.spanner.executor.v1.UpdateCloudInstanceAction value) { + if (updateCloudInstanceBuilder_ == null) { + if (actionCase_ == 7 + && action_ + != com.google.spanner.executor.v1.UpdateCloudInstanceAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.UpdateCloudInstanceAction.newBuilder( + (com.google.spanner.executor.v1.UpdateCloudInstanceAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 7) { + updateCloudInstanceBuilder_.mergeFrom(value); + } else { + updateCloudInstanceBuilder_.setMessage(value); + } + } + actionCase_ = 7; + return this; + } + /** + * + * + *
+     * Action that updates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + */ + public Builder clearUpdateCloudInstance() { + if (updateCloudInstanceBuilder_ == null) { + if (actionCase_ == 7) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 7) { + actionCase_ = 0; + action_ = null; + } + updateCloudInstanceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that updates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + */ + public com.google.spanner.executor.v1.UpdateCloudInstanceAction.Builder + getUpdateCloudInstanceBuilder() { + return getUpdateCloudInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that updates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudInstanceActionOrBuilder + getUpdateCloudInstanceOrBuilder() { + if ((actionCase_ == 7) && (updateCloudInstanceBuilder_ != null)) { + return updateCloudInstanceBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 7) { + return (com.google.spanner.executor.v1.UpdateCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudInstanceAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that updates a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateCloudInstanceAction, + com.google.spanner.executor.v1.UpdateCloudInstanceAction.Builder, + com.google.spanner.executor.v1.UpdateCloudInstanceActionOrBuilder> + getUpdateCloudInstanceFieldBuilder() { + if (updateCloudInstanceBuilder_ == null) { + if (!(actionCase_ == 7)) { + action_ = com.google.spanner.executor.v1.UpdateCloudInstanceAction.getDefaultInstance(); + } + updateCloudInstanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateCloudInstanceAction, + com.google.spanner.executor.v1.UpdateCloudInstanceAction.Builder, + com.google.spanner.executor.v1.UpdateCloudInstanceActionOrBuilder>( + (com.google.spanner.executor.v1.UpdateCloudInstanceAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 7; + onChanged(); + return updateCloudInstanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DeleteCloudInstanceAction, + com.google.spanner.executor.v1.DeleteCloudInstanceAction.Builder, + com.google.spanner.executor.v1.DeleteCloudInstanceActionOrBuilder> + deleteCloudInstanceBuilder_; + /** + * + * + *
+     * Action that deletes a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + * + * @return Whether the deleteCloudInstance field is set. + */ + @java.lang.Override + public boolean hasDeleteCloudInstance() { + return actionCase_ == 8; + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + * + * @return The deleteCloudInstance. + */ + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudInstanceAction getDeleteCloudInstance() { + if (deleteCloudInstanceBuilder_ == null) { + if (actionCase_ == 8) { + return (com.google.spanner.executor.v1.DeleteCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.DeleteCloudInstanceAction.getDefaultInstance(); + } else { + if (actionCase_ == 8) { + return deleteCloudInstanceBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.DeleteCloudInstanceAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + */ + public Builder setDeleteCloudInstance( + com.google.spanner.executor.v1.DeleteCloudInstanceAction value) { + if (deleteCloudInstanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + deleteCloudInstanceBuilder_.setMessage(value); + } + actionCase_ = 8; + return this; + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + */ + public Builder setDeleteCloudInstance( + com.google.spanner.executor.v1.DeleteCloudInstanceAction.Builder builderForValue) { + if (deleteCloudInstanceBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + deleteCloudInstanceBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 8; + return this; + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + */ + public Builder mergeDeleteCloudInstance( + com.google.spanner.executor.v1.DeleteCloudInstanceAction value) { + if (deleteCloudInstanceBuilder_ == null) { + if (actionCase_ == 8 + && action_ + != com.google.spanner.executor.v1.DeleteCloudInstanceAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.DeleteCloudInstanceAction.newBuilder( + (com.google.spanner.executor.v1.DeleteCloudInstanceAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 8) { + deleteCloudInstanceBuilder_.mergeFrom(value); + } else { + deleteCloudInstanceBuilder_.setMessage(value); + } + } + actionCase_ = 8; + return this; + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + */ + public Builder clearDeleteCloudInstance() { + if (deleteCloudInstanceBuilder_ == null) { + if (actionCase_ == 8) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 8) { + actionCase_ = 0; + action_ = null; + } + deleteCloudInstanceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + */ + public com.google.spanner.executor.v1.DeleteCloudInstanceAction.Builder + getDeleteCloudInstanceBuilder() { + return getDeleteCloudInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudInstanceActionOrBuilder + getDeleteCloudInstanceOrBuilder() { + if ((actionCase_ == 8) && (deleteCloudInstanceBuilder_ != null)) { + return deleteCloudInstanceBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 8) { + return (com.google.spanner.executor.v1.DeleteCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.DeleteCloudInstanceAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DeleteCloudInstanceAction, + com.google.spanner.executor.v1.DeleteCloudInstanceAction.Builder, + com.google.spanner.executor.v1.DeleteCloudInstanceActionOrBuilder> + getDeleteCloudInstanceFieldBuilder() { + if (deleteCloudInstanceBuilder_ == null) { + if (!(actionCase_ == 8)) { + action_ = com.google.spanner.executor.v1.DeleteCloudInstanceAction.getDefaultInstance(); + } + deleteCloudInstanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DeleteCloudInstanceAction, + com.google.spanner.executor.v1.DeleteCloudInstanceAction.Builder, + com.google.spanner.executor.v1.DeleteCloudInstanceActionOrBuilder>( + (com.google.spanner.executor.v1.DeleteCloudInstanceAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 8; + onChanged(); + return deleteCloudInstanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudInstancesAction, + com.google.spanner.executor.v1.ListCloudInstancesAction.Builder, + com.google.spanner.executor.v1.ListCloudInstancesActionOrBuilder> + listCloudInstancesBuilder_; + /** + * + * + *
+     * Action that lists Cloud Spanner instances.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + * + * @return Whether the listCloudInstances field is set. + */ + @java.lang.Override + public boolean hasListCloudInstances() { + return actionCase_ == 9; + } + /** + * + * + *
+     * Action that lists Cloud Spanner instances.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + * + * @return The listCloudInstances. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstancesAction getListCloudInstances() { + if (listCloudInstancesBuilder_ == null) { + if (actionCase_ == 9) { + return (com.google.spanner.executor.v1.ListCloudInstancesAction) action_; + } + return com.google.spanner.executor.v1.ListCloudInstancesAction.getDefaultInstance(); + } else { + if (actionCase_ == 9) { + return listCloudInstancesBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ListCloudInstancesAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that lists Cloud Spanner instances.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + */ + public Builder setListCloudInstances( + com.google.spanner.executor.v1.ListCloudInstancesAction value) { + if (listCloudInstancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + listCloudInstancesBuilder_.setMessage(value); + } + actionCase_ = 9; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner instances.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + */ + public Builder setListCloudInstances( + com.google.spanner.executor.v1.ListCloudInstancesAction.Builder builderForValue) { + if (listCloudInstancesBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + listCloudInstancesBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 9; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner instances.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + */ + public Builder mergeListCloudInstances( + com.google.spanner.executor.v1.ListCloudInstancesAction value) { + if (listCloudInstancesBuilder_ == null) { + if (actionCase_ == 9 + && action_ + != com.google.spanner.executor.v1.ListCloudInstancesAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.ListCloudInstancesAction.newBuilder( + (com.google.spanner.executor.v1.ListCloudInstancesAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 9) { + listCloudInstancesBuilder_.mergeFrom(value); + } else { + listCloudInstancesBuilder_.setMessage(value); + } + } + actionCase_ = 9; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner instances.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + */ + public Builder clearListCloudInstances() { + if (listCloudInstancesBuilder_ == null) { + if (actionCase_ == 9) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 9) { + actionCase_ = 0; + action_ = null; + } + listCloudInstancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner instances.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + */ + public com.google.spanner.executor.v1.ListCloudInstancesAction.Builder + getListCloudInstancesBuilder() { + return getListCloudInstancesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that lists Cloud Spanner instances.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstancesActionOrBuilder + getListCloudInstancesOrBuilder() { + if ((actionCase_ == 9) && (listCloudInstancesBuilder_ != null)) { + return listCloudInstancesBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 9) { + return (com.google.spanner.executor.v1.ListCloudInstancesAction) action_; + } + return com.google.spanner.executor.v1.ListCloudInstancesAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that lists Cloud Spanner instances.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudInstancesAction, + com.google.spanner.executor.v1.ListCloudInstancesAction.Builder, + com.google.spanner.executor.v1.ListCloudInstancesActionOrBuilder> + getListCloudInstancesFieldBuilder() { + if (listCloudInstancesBuilder_ == null) { + if (!(actionCase_ == 9)) { + action_ = com.google.spanner.executor.v1.ListCloudInstancesAction.getDefaultInstance(); + } + listCloudInstancesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudInstancesAction, + com.google.spanner.executor.v1.ListCloudInstancesAction.Builder, + com.google.spanner.executor.v1.ListCloudInstancesActionOrBuilder>( + (com.google.spanner.executor.v1.ListCloudInstancesAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 9; + onChanged(); + return listCloudInstancesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetCloudInstanceAction, + com.google.spanner.executor.v1.GetCloudInstanceAction.Builder, + com.google.spanner.executor.v1.GetCloudInstanceActionOrBuilder> + getCloudInstanceBuilder_; + /** + * + * + *
+     * Action that retrieves a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + * + * @return Whether the getCloudInstance field is set. + */ + @java.lang.Override + public boolean hasGetCloudInstance() { + return actionCase_ == 10; + } + /** + * + * + *
+     * Action that retrieves a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + * + * @return The getCloudInstance. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceAction getGetCloudInstance() { + if (getCloudInstanceBuilder_ == null) { + if (actionCase_ == 10) { + return (com.google.spanner.executor.v1.GetCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.GetCloudInstanceAction.getDefaultInstance(); + } else { + if (actionCase_ == 10) { + return getCloudInstanceBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.GetCloudInstanceAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that retrieves a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + */ + public Builder setGetCloudInstance( + com.google.spanner.executor.v1.GetCloudInstanceAction value) { + if (getCloudInstanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + getCloudInstanceBuilder_.setMessage(value); + } + actionCase_ = 10; + return this; + } + /** + * + * + *
+     * Action that retrieves a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + */ + public Builder setGetCloudInstance( + com.google.spanner.executor.v1.GetCloudInstanceAction.Builder builderForValue) { + if (getCloudInstanceBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + getCloudInstanceBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 10; + return this; + } + /** + * + * + *
+     * Action that retrieves a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + */ + public Builder mergeGetCloudInstance( + com.google.spanner.executor.v1.GetCloudInstanceAction value) { + if (getCloudInstanceBuilder_ == null) { + if (actionCase_ == 10 + && action_ + != com.google.spanner.executor.v1.GetCloudInstanceAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.GetCloudInstanceAction.newBuilder( + (com.google.spanner.executor.v1.GetCloudInstanceAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 10) { + getCloudInstanceBuilder_.mergeFrom(value); + } else { + getCloudInstanceBuilder_.setMessage(value); + } + } + actionCase_ = 10; + return this; + } + /** + * + * + *
+     * Action that retrieves a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + */ + public Builder clearGetCloudInstance() { + if (getCloudInstanceBuilder_ == null) { + if (actionCase_ == 10) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 10) { + actionCase_ = 0; + action_ = null; + } + getCloudInstanceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that retrieves a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + */ + public com.google.spanner.executor.v1.GetCloudInstanceAction.Builder + getGetCloudInstanceBuilder() { + return getGetCloudInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that retrieves a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceActionOrBuilder + getGetCloudInstanceOrBuilder() { + if ((actionCase_ == 10) && (getCloudInstanceBuilder_ != null)) { + return getCloudInstanceBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 10) { + return (com.google.spanner.executor.v1.GetCloudInstanceAction) action_; + } + return com.google.spanner.executor.v1.GetCloudInstanceAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that retrieves a Cloud Spanner instance.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetCloudInstanceAction, + com.google.spanner.executor.v1.GetCloudInstanceAction.Builder, + com.google.spanner.executor.v1.GetCloudInstanceActionOrBuilder> + getGetCloudInstanceFieldBuilder() { + if (getCloudInstanceBuilder_ == null) { + if (!(actionCase_ == 10)) { + action_ = com.google.spanner.executor.v1.GetCloudInstanceAction.getDefaultInstance(); + } + getCloudInstanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetCloudInstanceAction, + com.google.spanner.executor.v1.GetCloudInstanceAction.Builder, + com.google.spanner.executor.v1.GetCloudInstanceActionOrBuilder>( + (com.google.spanner.executor.v1.GetCloudInstanceAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 10; + onChanged(); + return getCloudInstanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CreateCloudDatabaseAction, + com.google.spanner.executor.v1.CreateCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.CreateCloudDatabaseActionOrBuilder> + createCloudDatabaseBuilder_; + /** + * + * + *
+     * Action that creates a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + * + * @return Whether the createCloudDatabase field is set. + */ + @java.lang.Override + public boolean hasCreateCloudDatabase() { + return actionCase_ == 11; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + * + * @return The createCloudDatabase. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudDatabaseAction getCreateCloudDatabase() { + if (createCloudDatabaseBuilder_ == null) { + if (actionCase_ == 11) { + return (com.google.spanner.executor.v1.CreateCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.CreateCloudDatabaseAction.getDefaultInstance(); + } else { + if (actionCase_ == 11) { + return createCloudDatabaseBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.CreateCloudDatabaseAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + */ + public Builder setCreateCloudDatabase( + com.google.spanner.executor.v1.CreateCloudDatabaseAction value) { + if (createCloudDatabaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + createCloudDatabaseBuilder_.setMessage(value); + } + actionCase_ = 11; + return this; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + */ + public Builder setCreateCloudDatabase( + com.google.spanner.executor.v1.CreateCloudDatabaseAction.Builder builderForValue) { + if (createCloudDatabaseBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + createCloudDatabaseBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 11; + return this; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + */ + public Builder mergeCreateCloudDatabase( + com.google.spanner.executor.v1.CreateCloudDatabaseAction value) { + if (createCloudDatabaseBuilder_ == null) { + if (actionCase_ == 11 + && action_ + != com.google.spanner.executor.v1.CreateCloudDatabaseAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.CreateCloudDatabaseAction.newBuilder( + (com.google.spanner.executor.v1.CreateCloudDatabaseAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 11) { + createCloudDatabaseBuilder_.mergeFrom(value); + } else { + createCloudDatabaseBuilder_.setMessage(value); + } + } + actionCase_ = 11; + return this; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + */ + public Builder clearCreateCloudDatabase() { + if (createCloudDatabaseBuilder_ == null) { + if (actionCase_ == 11) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 11) { + actionCase_ = 0; + action_ = null; + } + createCloudDatabaseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + */ + public com.google.spanner.executor.v1.CreateCloudDatabaseAction.Builder + getCreateCloudDatabaseBuilder() { + return getCreateCloudDatabaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudDatabaseActionOrBuilder + getCreateCloudDatabaseOrBuilder() { + if ((actionCase_ == 11) && (createCloudDatabaseBuilder_ != null)) { + return createCloudDatabaseBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 11) { + return (com.google.spanner.executor.v1.CreateCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.CreateCloudDatabaseAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CreateCloudDatabaseAction, + com.google.spanner.executor.v1.CreateCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.CreateCloudDatabaseActionOrBuilder> + getCreateCloudDatabaseFieldBuilder() { + if (createCloudDatabaseBuilder_ == null) { + if (!(actionCase_ == 11)) { + action_ = com.google.spanner.executor.v1.CreateCloudDatabaseAction.getDefaultInstance(); + } + createCloudDatabaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CreateCloudDatabaseAction, + com.google.spanner.executor.v1.CreateCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.CreateCloudDatabaseActionOrBuilder>( + (com.google.spanner.executor.v1.CreateCloudDatabaseAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 11; + onChanged(); + return createCloudDatabaseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction, + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.Builder, + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlActionOrBuilder> + updateCloudDatabaseDdlBuilder_; + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + * + * @return Whether the updateCloudDatabaseDdl field is set. + */ + @java.lang.Override + public boolean hasUpdateCloudDatabaseDdl() { + return actionCase_ == 12; + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + * + * @return The updateCloudDatabaseDdl. + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction getUpdateCloudDatabaseDdl() { + if (updateCloudDatabaseDdlBuilder_ == null) { + if (actionCase_ == 12) { + return (com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.getDefaultInstance(); + } else { + if (actionCase_ == 12) { + return updateCloudDatabaseDdlBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + */ + public Builder setUpdateCloudDatabaseDdl( + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction value) { + if (updateCloudDatabaseDdlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + updateCloudDatabaseDdlBuilder_.setMessage(value); + } + actionCase_ = 12; + return this; + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + */ + public Builder setUpdateCloudDatabaseDdl( + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.Builder builderForValue) { + if (updateCloudDatabaseDdlBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + updateCloudDatabaseDdlBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 12; + return this; + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + */ + public Builder mergeUpdateCloudDatabaseDdl( + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction value) { + if (updateCloudDatabaseDdlBuilder_ == null) { + if (actionCase_ == 12 + && action_ + != com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.newBuilder( + (com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 12) { + updateCloudDatabaseDdlBuilder_.mergeFrom(value); + } else { + updateCloudDatabaseDdlBuilder_.setMessage(value); + } + } + actionCase_ = 12; + return this; + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + */ + public Builder clearUpdateCloudDatabaseDdl() { + if (updateCloudDatabaseDdlBuilder_ == null) { + if (actionCase_ == 12) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 12) { + actionCase_ = 0; + action_ = null; + } + updateCloudDatabaseDdlBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + */ + public com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.Builder + getUpdateCloudDatabaseDdlBuilder() { + return getUpdateCloudDatabaseDdlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseDdlActionOrBuilder + getUpdateCloudDatabaseDdlOrBuilder() { + if ((actionCase_ == 12) && (updateCloudDatabaseDdlBuilder_ != null)) { + return updateCloudDatabaseDdlBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 12) { + return (com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction, + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.Builder, + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlActionOrBuilder> + getUpdateCloudDatabaseDdlFieldBuilder() { + if (updateCloudDatabaseDdlBuilder_ == null) { + if (!(actionCase_ == 12)) { + action_ = + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.getDefaultInstance(); + } + updateCloudDatabaseDdlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction, + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.Builder, + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlActionOrBuilder>( + (com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 12; + onChanged(); + return updateCloudDatabaseDdlBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateCloudDatabaseAction, + com.google.spanner.executor.v1.UpdateCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.UpdateCloudDatabaseActionOrBuilder> + updateCloudDatabaseBuilder_; + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + * + * @return Whether the updateCloudDatabase field is set. + */ + @java.lang.Override + public boolean hasUpdateCloudDatabase() { + return actionCase_ == 27; + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + * + * @return The updateCloudDatabase. + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseAction getUpdateCloudDatabase() { + if (updateCloudDatabaseBuilder_ == null) { + if (actionCase_ == 27) { + return (com.google.spanner.executor.v1.UpdateCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudDatabaseAction.getDefaultInstance(); + } else { + if (actionCase_ == 27) { + return updateCloudDatabaseBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.UpdateCloudDatabaseAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + */ + public Builder setUpdateCloudDatabase( + com.google.spanner.executor.v1.UpdateCloudDatabaseAction value) { + if (updateCloudDatabaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + updateCloudDatabaseBuilder_.setMessage(value); + } + actionCase_ = 27; + return this; + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + */ + public Builder setUpdateCloudDatabase( + com.google.spanner.executor.v1.UpdateCloudDatabaseAction.Builder builderForValue) { + if (updateCloudDatabaseBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + updateCloudDatabaseBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 27; + return this; + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + */ + public Builder mergeUpdateCloudDatabase( + com.google.spanner.executor.v1.UpdateCloudDatabaseAction value) { + if (updateCloudDatabaseBuilder_ == null) { + if (actionCase_ == 27 + && action_ + != com.google.spanner.executor.v1.UpdateCloudDatabaseAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.UpdateCloudDatabaseAction.newBuilder( + (com.google.spanner.executor.v1.UpdateCloudDatabaseAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 27) { + updateCloudDatabaseBuilder_.mergeFrom(value); + } else { + updateCloudDatabaseBuilder_.setMessage(value); + } + } + actionCase_ = 27; + return this; + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + */ + public Builder clearUpdateCloudDatabase() { + if (updateCloudDatabaseBuilder_ == null) { + if (actionCase_ == 27) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 27) { + actionCase_ = 0; + action_ = null; + } + updateCloudDatabaseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + */ + public com.google.spanner.executor.v1.UpdateCloudDatabaseAction.Builder + getUpdateCloudDatabaseBuilder() { + return getUpdateCloudDatabaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseActionOrBuilder + getUpdateCloudDatabaseOrBuilder() { + if ((actionCase_ == 27) && (updateCloudDatabaseBuilder_ != null)) { + return updateCloudDatabaseBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 27) { + return (com.google.spanner.executor.v1.UpdateCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudDatabaseAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that updates the schema of a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateCloudDatabaseAction, + com.google.spanner.executor.v1.UpdateCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.UpdateCloudDatabaseActionOrBuilder> + getUpdateCloudDatabaseFieldBuilder() { + if (updateCloudDatabaseBuilder_ == null) { + if (!(actionCase_ == 27)) { + action_ = com.google.spanner.executor.v1.UpdateCloudDatabaseAction.getDefaultInstance(); + } + updateCloudDatabaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateCloudDatabaseAction, + com.google.spanner.executor.v1.UpdateCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.UpdateCloudDatabaseActionOrBuilder>( + (com.google.spanner.executor.v1.UpdateCloudDatabaseAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 27; + onChanged(); + return updateCloudDatabaseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DropCloudDatabaseAction, + com.google.spanner.executor.v1.DropCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.DropCloudDatabaseActionOrBuilder> + dropCloudDatabaseBuilder_; + /** + * + * + *
+     * Action that drops a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + * + * @return Whether the dropCloudDatabase field is set. + */ + @java.lang.Override + public boolean hasDropCloudDatabase() { + return actionCase_ == 13; + } + /** + * + * + *
+     * Action that drops a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + * + * @return The dropCloudDatabase. + */ + @java.lang.Override + public com.google.spanner.executor.v1.DropCloudDatabaseAction getDropCloudDatabase() { + if (dropCloudDatabaseBuilder_ == null) { + if (actionCase_ == 13) { + return (com.google.spanner.executor.v1.DropCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.DropCloudDatabaseAction.getDefaultInstance(); + } else { + if (actionCase_ == 13) { + return dropCloudDatabaseBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.DropCloudDatabaseAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that drops a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + */ + public Builder setDropCloudDatabase( + com.google.spanner.executor.v1.DropCloudDatabaseAction value) { + if (dropCloudDatabaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + dropCloudDatabaseBuilder_.setMessage(value); + } + actionCase_ = 13; + return this; + } + /** + * + * + *
+     * Action that drops a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + */ + public Builder setDropCloudDatabase( + com.google.spanner.executor.v1.DropCloudDatabaseAction.Builder builderForValue) { + if (dropCloudDatabaseBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + dropCloudDatabaseBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 13; + return this; + } + /** + * + * + *
+     * Action that drops a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + */ + public Builder mergeDropCloudDatabase( + com.google.spanner.executor.v1.DropCloudDatabaseAction value) { + if (dropCloudDatabaseBuilder_ == null) { + if (actionCase_ == 13 + && action_ + != com.google.spanner.executor.v1.DropCloudDatabaseAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.DropCloudDatabaseAction.newBuilder( + (com.google.spanner.executor.v1.DropCloudDatabaseAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 13) { + dropCloudDatabaseBuilder_.mergeFrom(value); + } else { + dropCloudDatabaseBuilder_.setMessage(value); + } + } + actionCase_ = 13; + return this; + } + /** + * + * + *
+     * Action that drops a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + */ + public Builder clearDropCloudDatabase() { + if (dropCloudDatabaseBuilder_ == null) { + if (actionCase_ == 13) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 13) { + actionCase_ = 0; + action_ = null; + } + dropCloudDatabaseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that drops a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + */ + public com.google.spanner.executor.v1.DropCloudDatabaseAction.Builder + getDropCloudDatabaseBuilder() { + return getDropCloudDatabaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that drops a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DropCloudDatabaseActionOrBuilder + getDropCloudDatabaseOrBuilder() { + if ((actionCase_ == 13) && (dropCloudDatabaseBuilder_ != null)) { + return dropCloudDatabaseBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 13) { + return (com.google.spanner.executor.v1.DropCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.DropCloudDatabaseAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that drops a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DropCloudDatabaseAction, + com.google.spanner.executor.v1.DropCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.DropCloudDatabaseActionOrBuilder> + getDropCloudDatabaseFieldBuilder() { + if (dropCloudDatabaseBuilder_ == null) { + if (!(actionCase_ == 13)) { + action_ = com.google.spanner.executor.v1.DropCloudDatabaseAction.getDefaultInstance(); + } + dropCloudDatabaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DropCloudDatabaseAction, + com.google.spanner.executor.v1.DropCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.DropCloudDatabaseActionOrBuilder>( + (com.google.spanner.executor.v1.DropCloudDatabaseAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 13; + onChanged(); + return dropCloudDatabaseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudDatabasesAction, + com.google.spanner.executor.v1.ListCloudDatabasesAction.Builder, + com.google.spanner.executor.v1.ListCloudDatabasesActionOrBuilder> + listCloudDatabasesBuilder_; + /** + * + * + *
+     * Action that lists Cloud Spanner databases.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + * + * @return Whether the listCloudDatabases field is set. + */ + @java.lang.Override + public boolean hasListCloudDatabases() { + return actionCase_ == 14; + } + /** + * + * + *
+     * Action that lists Cloud Spanner databases.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + * + * @return The listCloudDatabases. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabasesAction getListCloudDatabases() { + if (listCloudDatabasesBuilder_ == null) { + if (actionCase_ == 14) { + return (com.google.spanner.executor.v1.ListCloudDatabasesAction) action_; + } + return com.google.spanner.executor.v1.ListCloudDatabasesAction.getDefaultInstance(); + } else { + if (actionCase_ == 14) { + return listCloudDatabasesBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ListCloudDatabasesAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that lists Cloud Spanner databases.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + */ + public Builder setListCloudDatabases( + com.google.spanner.executor.v1.ListCloudDatabasesAction value) { + if (listCloudDatabasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + listCloudDatabasesBuilder_.setMessage(value); + } + actionCase_ = 14; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner databases.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + */ + public Builder setListCloudDatabases( + com.google.spanner.executor.v1.ListCloudDatabasesAction.Builder builderForValue) { + if (listCloudDatabasesBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + listCloudDatabasesBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 14; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner databases.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + */ + public Builder mergeListCloudDatabases( + com.google.spanner.executor.v1.ListCloudDatabasesAction value) { + if (listCloudDatabasesBuilder_ == null) { + if (actionCase_ == 14 + && action_ + != com.google.spanner.executor.v1.ListCloudDatabasesAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.ListCloudDatabasesAction.newBuilder( + (com.google.spanner.executor.v1.ListCloudDatabasesAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 14) { + listCloudDatabasesBuilder_.mergeFrom(value); + } else { + listCloudDatabasesBuilder_.setMessage(value); + } + } + actionCase_ = 14; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner databases.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + */ + public Builder clearListCloudDatabases() { + if (listCloudDatabasesBuilder_ == null) { + if (actionCase_ == 14) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 14) { + actionCase_ = 0; + action_ = null; + } + listCloudDatabasesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner databases.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + */ + public com.google.spanner.executor.v1.ListCloudDatabasesAction.Builder + getListCloudDatabasesBuilder() { + return getListCloudDatabasesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that lists Cloud Spanner databases.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabasesActionOrBuilder + getListCloudDatabasesOrBuilder() { + if ((actionCase_ == 14) && (listCloudDatabasesBuilder_ != null)) { + return listCloudDatabasesBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 14) { + return (com.google.spanner.executor.v1.ListCloudDatabasesAction) action_; + } + return com.google.spanner.executor.v1.ListCloudDatabasesAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that lists Cloud Spanner databases.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudDatabasesAction, + com.google.spanner.executor.v1.ListCloudDatabasesAction.Builder, + com.google.spanner.executor.v1.ListCloudDatabasesActionOrBuilder> + getListCloudDatabasesFieldBuilder() { + if (listCloudDatabasesBuilder_ == null) { + if (!(actionCase_ == 14)) { + action_ = com.google.spanner.executor.v1.ListCloudDatabasesAction.getDefaultInstance(); + } + listCloudDatabasesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudDatabasesAction, + com.google.spanner.executor.v1.ListCloudDatabasesAction.Builder, + com.google.spanner.executor.v1.ListCloudDatabasesActionOrBuilder>( + (com.google.spanner.executor.v1.ListCloudDatabasesAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 14; + onChanged(); + return listCloudDatabasesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction, + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.Builder, + com.google.spanner.executor.v1.ListCloudDatabaseOperationsActionOrBuilder> + listCloudDatabaseOperationsBuilder_; + /** + * + * + *
+     * Action that lists Cloud Spanner database operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + * + * @return Whether the listCloudDatabaseOperations field is set. + */ + @java.lang.Override + public boolean hasListCloudDatabaseOperations() { + return actionCase_ == 15; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + * + * @return The listCloudDatabaseOperations. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction + getListCloudDatabaseOperations() { + if (listCloudDatabaseOperationsBuilder_ == null) { + if (actionCase_ == 15) { + return (com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction + .getDefaultInstance(); + } else { + if (actionCase_ == 15) { + return listCloudDatabaseOperationsBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that lists Cloud Spanner database operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + */ + public Builder setListCloudDatabaseOperations( + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction value) { + if (listCloudDatabaseOperationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + listCloudDatabaseOperationsBuilder_.setMessage(value); + } + actionCase_ = 15; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + */ + public Builder setListCloudDatabaseOperations( + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.Builder builderForValue) { + if (listCloudDatabaseOperationsBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + listCloudDatabaseOperationsBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 15; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + */ + public Builder mergeListCloudDatabaseOperations( + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction value) { + if (listCloudDatabaseOperationsBuilder_ == null) { + if (actionCase_ == 15 + && action_ + != com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.newBuilder( + (com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 15) { + listCloudDatabaseOperationsBuilder_.mergeFrom(value); + } else { + listCloudDatabaseOperationsBuilder_.setMessage(value); + } + } + actionCase_ = 15; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + */ + public Builder clearListCloudDatabaseOperations() { + if (listCloudDatabaseOperationsBuilder_ == null) { + if (actionCase_ == 15) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 15) { + actionCase_ = 0; + action_ = null; + } + listCloudDatabaseOperationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + */ + public com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.Builder + getListCloudDatabaseOperationsBuilder() { + return getListCloudDatabaseOperationsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that lists Cloud Spanner database operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabaseOperationsActionOrBuilder + getListCloudDatabaseOperationsOrBuilder() { + if ((actionCase_ == 15) && (listCloudDatabaseOperationsBuilder_ != null)) { + return listCloudDatabaseOperationsBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 15) { + return (com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that lists Cloud Spanner database operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction, + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.Builder, + com.google.spanner.executor.v1.ListCloudDatabaseOperationsActionOrBuilder> + getListCloudDatabaseOperationsFieldBuilder() { + if (listCloudDatabaseOperationsBuilder_ == null) { + if (!(actionCase_ == 15)) { + action_ = + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.getDefaultInstance(); + } + listCloudDatabaseOperationsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction, + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.Builder, + com.google.spanner.executor.v1.ListCloudDatabaseOperationsActionOrBuilder>( + (com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 15; + onChanged(); + return listCloudDatabaseOperationsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.RestoreCloudDatabaseAction, + com.google.spanner.executor.v1.RestoreCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.RestoreCloudDatabaseActionOrBuilder> + restoreCloudDatabaseBuilder_; + /** + * + * + *
+     * Action that restores a Cloud Spanner database from a backup.
+     * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + * + * @return Whether the restoreCloudDatabase field is set. + */ + @java.lang.Override + public boolean hasRestoreCloudDatabase() { + return actionCase_ == 16; + } + /** + * + * + *
+     * Action that restores a Cloud Spanner database from a backup.
+     * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + * + * @return The restoreCloudDatabase. + */ + @java.lang.Override + public com.google.spanner.executor.v1.RestoreCloudDatabaseAction getRestoreCloudDatabase() { + if (restoreCloudDatabaseBuilder_ == null) { + if (actionCase_ == 16) { + return (com.google.spanner.executor.v1.RestoreCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.RestoreCloudDatabaseAction.getDefaultInstance(); + } else { + if (actionCase_ == 16) { + return restoreCloudDatabaseBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.RestoreCloudDatabaseAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that restores a Cloud Spanner database from a backup.
+     * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + */ + public Builder setRestoreCloudDatabase( + com.google.spanner.executor.v1.RestoreCloudDatabaseAction value) { + if (restoreCloudDatabaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + restoreCloudDatabaseBuilder_.setMessage(value); + } + actionCase_ = 16; + return this; + } + /** + * + * + *
+     * Action that restores a Cloud Spanner database from a backup.
+     * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + */ + public Builder setRestoreCloudDatabase( + com.google.spanner.executor.v1.RestoreCloudDatabaseAction.Builder builderForValue) { + if (restoreCloudDatabaseBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + restoreCloudDatabaseBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 16; + return this; + } + /** + * + * + *
+     * Action that restores a Cloud Spanner database from a backup.
+     * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + */ + public Builder mergeRestoreCloudDatabase( + com.google.spanner.executor.v1.RestoreCloudDatabaseAction value) { + if (restoreCloudDatabaseBuilder_ == null) { + if (actionCase_ == 16 + && action_ + != com.google.spanner.executor.v1.RestoreCloudDatabaseAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.RestoreCloudDatabaseAction.newBuilder( + (com.google.spanner.executor.v1.RestoreCloudDatabaseAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 16) { + restoreCloudDatabaseBuilder_.mergeFrom(value); + } else { + restoreCloudDatabaseBuilder_.setMessage(value); + } + } + actionCase_ = 16; + return this; + } + /** + * + * + *
+     * Action that restores a Cloud Spanner database from a backup.
+     * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + */ + public Builder clearRestoreCloudDatabase() { + if (restoreCloudDatabaseBuilder_ == null) { + if (actionCase_ == 16) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 16) { + actionCase_ = 0; + action_ = null; + } + restoreCloudDatabaseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that restores a Cloud Spanner database from a backup.
+     * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + */ + public com.google.spanner.executor.v1.RestoreCloudDatabaseAction.Builder + getRestoreCloudDatabaseBuilder() { + return getRestoreCloudDatabaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that restores a Cloud Spanner database from a backup.
+     * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.RestoreCloudDatabaseActionOrBuilder + getRestoreCloudDatabaseOrBuilder() { + if ((actionCase_ == 16) && (restoreCloudDatabaseBuilder_ != null)) { + return restoreCloudDatabaseBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 16) { + return (com.google.spanner.executor.v1.RestoreCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.RestoreCloudDatabaseAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that restores a Cloud Spanner database from a backup.
+     * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.RestoreCloudDatabaseAction, + com.google.spanner.executor.v1.RestoreCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.RestoreCloudDatabaseActionOrBuilder> + getRestoreCloudDatabaseFieldBuilder() { + if (restoreCloudDatabaseBuilder_ == null) { + if (!(actionCase_ == 16)) { + action_ = com.google.spanner.executor.v1.RestoreCloudDatabaseAction.getDefaultInstance(); + } + restoreCloudDatabaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.RestoreCloudDatabaseAction, + com.google.spanner.executor.v1.RestoreCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.RestoreCloudDatabaseActionOrBuilder>( + (com.google.spanner.executor.v1.RestoreCloudDatabaseAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 16; + onChanged(); + return restoreCloudDatabaseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetCloudDatabaseAction, + com.google.spanner.executor.v1.GetCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.GetCloudDatabaseActionOrBuilder> + getCloudDatabaseBuilder_; + /** + * + * + *
+     * Action that gets a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + * + * @return Whether the getCloudDatabase field is set. + */ + @java.lang.Override + public boolean hasGetCloudDatabase() { + return actionCase_ == 17; + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + * + * @return The getCloudDatabase. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudDatabaseAction getGetCloudDatabase() { + if (getCloudDatabaseBuilder_ == null) { + if (actionCase_ == 17) { + return (com.google.spanner.executor.v1.GetCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.GetCloudDatabaseAction.getDefaultInstance(); + } else { + if (actionCase_ == 17) { + return getCloudDatabaseBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.GetCloudDatabaseAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + */ + public Builder setGetCloudDatabase( + com.google.spanner.executor.v1.GetCloudDatabaseAction value) { + if (getCloudDatabaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + getCloudDatabaseBuilder_.setMessage(value); + } + actionCase_ = 17; + return this; + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + */ + public Builder setGetCloudDatabase( + com.google.spanner.executor.v1.GetCloudDatabaseAction.Builder builderForValue) { + if (getCloudDatabaseBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + getCloudDatabaseBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 17; + return this; + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + */ + public Builder mergeGetCloudDatabase( + com.google.spanner.executor.v1.GetCloudDatabaseAction value) { + if (getCloudDatabaseBuilder_ == null) { + if (actionCase_ == 17 + && action_ + != com.google.spanner.executor.v1.GetCloudDatabaseAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.GetCloudDatabaseAction.newBuilder( + (com.google.spanner.executor.v1.GetCloudDatabaseAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 17) { + getCloudDatabaseBuilder_.mergeFrom(value); + } else { + getCloudDatabaseBuilder_.setMessage(value); + } + } + actionCase_ = 17; + return this; + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + */ + public Builder clearGetCloudDatabase() { + if (getCloudDatabaseBuilder_ == null) { + if (actionCase_ == 17) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 17) { + actionCase_ = 0; + action_ = null; + } + getCloudDatabaseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + */ + public com.google.spanner.executor.v1.GetCloudDatabaseAction.Builder + getGetCloudDatabaseBuilder() { + return getGetCloudDatabaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudDatabaseActionOrBuilder + getGetCloudDatabaseOrBuilder() { + if ((actionCase_ == 17) && (getCloudDatabaseBuilder_ != null)) { + return getCloudDatabaseBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 17) { + return (com.google.spanner.executor.v1.GetCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.GetCloudDatabaseAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetCloudDatabaseAction, + com.google.spanner.executor.v1.GetCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.GetCloudDatabaseActionOrBuilder> + getGetCloudDatabaseFieldBuilder() { + if (getCloudDatabaseBuilder_ == null) { + if (!(actionCase_ == 17)) { + action_ = com.google.spanner.executor.v1.GetCloudDatabaseAction.getDefaultInstance(); + } + getCloudDatabaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetCloudDatabaseAction, + com.google.spanner.executor.v1.GetCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.GetCloudDatabaseActionOrBuilder>( + (com.google.spanner.executor.v1.GetCloudDatabaseAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 17; + onChanged(); + return getCloudDatabaseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CreateCloudBackupAction, + com.google.spanner.executor.v1.CreateCloudBackupAction.Builder, + com.google.spanner.executor.v1.CreateCloudBackupActionOrBuilder> + createCloudBackupBuilder_; + /** + * + * + *
+     * Action that creates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + * + * @return Whether the createCloudBackup field is set. + */ + @java.lang.Override + public boolean hasCreateCloudBackup() { + return actionCase_ == 18; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + * + * @return The createCloudBackup. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudBackupAction getCreateCloudBackup() { + if (createCloudBackupBuilder_ == null) { + if (actionCase_ == 18) { + return (com.google.spanner.executor.v1.CreateCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.CreateCloudBackupAction.getDefaultInstance(); + } else { + if (actionCase_ == 18) { + return createCloudBackupBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.CreateCloudBackupAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + */ + public Builder setCreateCloudBackup( + com.google.spanner.executor.v1.CreateCloudBackupAction value) { + if (createCloudBackupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + createCloudBackupBuilder_.setMessage(value); + } + actionCase_ = 18; + return this; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + */ + public Builder setCreateCloudBackup( + com.google.spanner.executor.v1.CreateCloudBackupAction.Builder builderForValue) { + if (createCloudBackupBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + createCloudBackupBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 18; + return this; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + */ + public Builder mergeCreateCloudBackup( + com.google.spanner.executor.v1.CreateCloudBackupAction value) { + if (createCloudBackupBuilder_ == null) { + if (actionCase_ == 18 + && action_ + != com.google.spanner.executor.v1.CreateCloudBackupAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.CreateCloudBackupAction.newBuilder( + (com.google.spanner.executor.v1.CreateCloudBackupAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 18) { + createCloudBackupBuilder_.mergeFrom(value); + } else { + createCloudBackupBuilder_.setMessage(value); + } + } + actionCase_ = 18; + return this; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + */ + public Builder clearCreateCloudBackup() { + if (createCloudBackupBuilder_ == null) { + if (actionCase_ == 18) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 18) { + actionCase_ = 0; + action_ = null; + } + createCloudBackupBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + */ + public com.google.spanner.executor.v1.CreateCloudBackupAction.Builder + getCreateCloudBackupBuilder() { + return getCreateCloudBackupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudBackupActionOrBuilder + getCreateCloudBackupOrBuilder() { + if ((actionCase_ == 18) && (createCloudBackupBuilder_ != null)) { + return createCloudBackupBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 18) { + return (com.google.spanner.executor.v1.CreateCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.CreateCloudBackupAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that creates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CreateCloudBackupAction, + com.google.spanner.executor.v1.CreateCloudBackupAction.Builder, + com.google.spanner.executor.v1.CreateCloudBackupActionOrBuilder> + getCreateCloudBackupFieldBuilder() { + if (createCloudBackupBuilder_ == null) { + if (!(actionCase_ == 18)) { + action_ = com.google.spanner.executor.v1.CreateCloudBackupAction.getDefaultInstance(); + } + createCloudBackupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CreateCloudBackupAction, + com.google.spanner.executor.v1.CreateCloudBackupAction.Builder, + com.google.spanner.executor.v1.CreateCloudBackupActionOrBuilder>( + (com.google.spanner.executor.v1.CreateCloudBackupAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 18; + onChanged(); + return createCloudBackupBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CopyCloudBackupAction, + com.google.spanner.executor.v1.CopyCloudBackupAction.Builder, + com.google.spanner.executor.v1.CopyCloudBackupActionOrBuilder> + copyCloudBackupBuilder_; + /** + * + * + *
+     * Action that copies a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + * + * @return Whether the copyCloudBackup field is set. + */ + @java.lang.Override + public boolean hasCopyCloudBackup() { + return actionCase_ == 19; + } + /** + * + * + *
+     * Action that copies a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + * + * @return The copyCloudBackup. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CopyCloudBackupAction getCopyCloudBackup() { + if (copyCloudBackupBuilder_ == null) { + if (actionCase_ == 19) { + return (com.google.spanner.executor.v1.CopyCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.CopyCloudBackupAction.getDefaultInstance(); + } else { + if (actionCase_ == 19) { + return copyCloudBackupBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.CopyCloudBackupAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that copies a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + */ + public Builder setCopyCloudBackup(com.google.spanner.executor.v1.CopyCloudBackupAction value) { + if (copyCloudBackupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + copyCloudBackupBuilder_.setMessage(value); + } + actionCase_ = 19; + return this; + } + /** + * + * + *
+     * Action that copies a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + */ + public Builder setCopyCloudBackup( + com.google.spanner.executor.v1.CopyCloudBackupAction.Builder builderForValue) { + if (copyCloudBackupBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + copyCloudBackupBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 19; + return this; + } + /** + * + * + *
+     * Action that copies a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + */ + public Builder mergeCopyCloudBackup( + com.google.spanner.executor.v1.CopyCloudBackupAction value) { + if (copyCloudBackupBuilder_ == null) { + if (actionCase_ == 19 + && action_ + != com.google.spanner.executor.v1.CopyCloudBackupAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.CopyCloudBackupAction.newBuilder( + (com.google.spanner.executor.v1.CopyCloudBackupAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 19) { + copyCloudBackupBuilder_.mergeFrom(value); + } else { + copyCloudBackupBuilder_.setMessage(value); + } + } + actionCase_ = 19; + return this; + } + /** + * + * + *
+     * Action that copies a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + */ + public Builder clearCopyCloudBackup() { + if (copyCloudBackupBuilder_ == null) { + if (actionCase_ == 19) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 19) { + actionCase_ = 0; + action_ = null; + } + copyCloudBackupBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that copies a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + */ + public com.google.spanner.executor.v1.CopyCloudBackupAction.Builder + getCopyCloudBackupBuilder() { + return getCopyCloudBackupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that copies a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CopyCloudBackupActionOrBuilder + getCopyCloudBackupOrBuilder() { + if ((actionCase_ == 19) && (copyCloudBackupBuilder_ != null)) { + return copyCloudBackupBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 19) { + return (com.google.spanner.executor.v1.CopyCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.CopyCloudBackupAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that copies a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CopyCloudBackupAction, + com.google.spanner.executor.v1.CopyCloudBackupAction.Builder, + com.google.spanner.executor.v1.CopyCloudBackupActionOrBuilder> + getCopyCloudBackupFieldBuilder() { + if (copyCloudBackupBuilder_ == null) { + if (!(actionCase_ == 19)) { + action_ = com.google.spanner.executor.v1.CopyCloudBackupAction.getDefaultInstance(); + } + copyCloudBackupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CopyCloudBackupAction, + com.google.spanner.executor.v1.CopyCloudBackupAction.Builder, + com.google.spanner.executor.v1.CopyCloudBackupActionOrBuilder>( + (com.google.spanner.executor.v1.CopyCloudBackupAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 19; + onChanged(); + return copyCloudBackupBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetCloudBackupAction, + com.google.spanner.executor.v1.GetCloudBackupAction.Builder, + com.google.spanner.executor.v1.GetCloudBackupActionOrBuilder> + getCloudBackupBuilder_; + /** + * + * + *
+     * Action that gets a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + * + * @return Whether the getCloudBackup field is set. + */ + @java.lang.Override + public boolean hasGetCloudBackup() { + return actionCase_ == 20; + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + * + * @return The getCloudBackup. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudBackupAction getGetCloudBackup() { + if (getCloudBackupBuilder_ == null) { + if (actionCase_ == 20) { + return (com.google.spanner.executor.v1.GetCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.GetCloudBackupAction.getDefaultInstance(); + } else { + if (actionCase_ == 20) { + return getCloudBackupBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.GetCloudBackupAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + */ + public Builder setGetCloudBackup(com.google.spanner.executor.v1.GetCloudBackupAction value) { + if (getCloudBackupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + getCloudBackupBuilder_.setMessage(value); + } + actionCase_ = 20; + return this; + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + */ + public Builder setGetCloudBackup( + com.google.spanner.executor.v1.GetCloudBackupAction.Builder builderForValue) { + if (getCloudBackupBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + getCloudBackupBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 20; + return this; + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + */ + public Builder mergeGetCloudBackup(com.google.spanner.executor.v1.GetCloudBackupAction value) { + if (getCloudBackupBuilder_ == null) { + if (actionCase_ == 20 + && action_ + != com.google.spanner.executor.v1.GetCloudBackupAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.GetCloudBackupAction.newBuilder( + (com.google.spanner.executor.v1.GetCloudBackupAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 20) { + getCloudBackupBuilder_.mergeFrom(value); + } else { + getCloudBackupBuilder_.setMessage(value); + } + } + actionCase_ = 20; + return this; + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + */ + public Builder clearGetCloudBackup() { + if (getCloudBackupBuilder_ == null) { + if (actionCase_ == 20) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 20) { + actionCase_ = 0; + action_ = null; + } + getCloudBackupBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + */ + public com.google.spanner.executor.v1.GetCloudBackupAction.Builder getGetCloudBackupBuilder() { + return getGetCloudBackupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudBackupActionOrBuilder + getGetCloudBackupOrBuilder() { + if ((actionCase_ == 20) && (getCloudBackupBuilder_ != null)) { + return getCloudBackupBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 20) { + return (com.google.spanner.executor.v1.GetCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.GetCloudBackupAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that gets a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetCloudBackupAction, + com.google.spanner.executor.v1.GetCloudBackupAction.Builder, + com.google.spanner.executor.v1.GetCloudBackupActionOrBuilder> + getGetCloudBackupFieldBuilder() { + if (getCloudBackupBuilder_ == null) { + if (!(actionCase_ == 20)) { + action_ = com.google.spanner.executor.v1.GetCloudBackupAction.getDefaultInstance(); + } + getCloudBackupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetCloudBackupAction, + com.google.spanner.executor.v1.GetCloudBackupAction.Builder, + com.google.spanner.executor.v1.GetCloudBackupActionOrBuilder>( + (com.google.spanner.executor.v1.GetCloudBackupAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 20; + onChanged(); + return getCloudBackupBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateCloudBackupAction, + com.google.spanner.executor.v1.UpdateCloudBackupAction.Builder, + com.google.spanner.executor.v1.UpdateCloudBackupActionOrBuilder> + updateCloudBackupBuilder_; + /** + * + * + *
+     * Action that updates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + * + * @return Whether the updateCloudBackup field is set. + */ + @java.lang.Override + public boolean hasUpdateCloudBackup() { + return actionCase_ == 21; + } + /** + * + * + *
+     * Action that updates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + * + * @return The updateCloudBackup. + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudBackupAction getUpdateCloudBackup() { + if (updateCloudBackupBuilder_ == null) { + if (actionCase_ == 21) { + return (com.google.spanner.executor.v1.UpdateCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudBackupAction.getDefaultInstance(); + } else { + if (actionCase_ == 21) { + return updateCloudBackupBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.UpdateCloudBackupAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that updates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + */ + public Builder setUpdateCloudBackup( + com.google.spanner.executor.v1.UpdateCloudBackupAction value) { + if (updateCloudBackupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + updateCloudBackupBuilder_.setMessage(value); + } + actionCase_ = 21; + return this; + } + /** + * + * + *
+     * Action that updates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + */ + public Builder setUpdateCloudBackup( + com.google.spanner.executor.v1.UpdateCloudBackupAction.Builder builderForValue) { + if (updateCloudBackupBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + updateCloudBackupBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 21; + return this; + } + /** + * + * + *
+     * Action that updates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + */ + public Builder mergeUpdateCloudBackup( + com.google.spanner.executor.v1.UpdateCloudBackupAction value) { + if (updateCloudBackupBuilder_ == null) { + if (actionCase_ == 21 + && action_ + != com.google.spanner.executor.v1.UpdateCloudBackupAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.UpdateCloudBackupAction.newBuilder( + (com.google.spanner.executor.v1.UpdateCloudBackupAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 21) { + updateCloudBackupBuilder_.mergeFrom(value); + } else { + updateCloudBackupBuilder_.setMessage(value); + } + } + actionCase_ = 21; + return this; + } + /** + * + * + *
+     * Action that updates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + */ + public Builder clearUpdateCloudBackup() { + if (updateCloudBackupBuilder_ == null) { + if (actionCase_ == 21) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 21) { + actionCase_ = 0; + action_ = null; + } + updateCloudBackupBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that updates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + */ + public com.google.spanner.executor.v1.UpdateCloudBackupAction.Builder + getUpdateCloudBackupBuilder() { + return getUpdateCloudBackupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that updates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + */ + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudBackupActionOrBuilder + getUpdateCloudBackupOrBuilder() { + if ((actionCase_ == 21) && (updateCloudBackupBuilder_ != null)) { + return updateCloudBackupBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 21) { + return (com.google.spanner.executor.v1.UpdateCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.UpdateCloudBackupAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that updates a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateCloudBackupAction, + com.google.spanner.executor.v1.UpdateCloudBackupAction.Builder, + com.google.spanner.executor.v1.UpdateCloudBackupActionOrBuilder> + getUpdateCloudBackupFieldBuilder() { + if (updateCloudBackupBuilder_ == null) { + if (!(actionCase_ == 21)) { + action_ = com.google.spanner.executor.v1.UpdateCloudBackupAction.getDefaultInstance(); + } + updateCloudBackupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.UpdateCloudBackupAction, + com.google.spanner.executor.v1.UpdateCloudBackupAction.Builder, + com.google.spanner.executor.v1.UpdateCloudBackupActionOrBuilder>( + (com.google.spanner.executor.v1.UpdateCloudBackupAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 21; + onChanged(); + return updateCloudBackupBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DeleteCloudBackupAction, + com.google.spanner.executor.v1.DeleteCloudBackupAction.Builder, + com.google.spanner.executor.v1.DeleteCloudBackupActionOrBuilder> + deleteCloudBackupBuilder_; + /** + * + * + *
+     * Action that deletes a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + * + * @return Whether the deleteCloudBackup field is set. + */ + @java.lang.Override + public boolean hasDeleteCloudBackup() { + return actionCase_ == 22; + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + * + * @return The deleteCloudBackup. + */ + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudBackupAction getDeleteCloudBackup() { + if (deleteCloudBackupBuilder_ == null) { + if (actionCase_ == 22) { + return (com.google.spanner.executor.v1.DeleteCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.DeleteCloudBackupAction.getDefaultInstance(); + } else { + if (actionCase_ == 22) { + return deleteCloudBackupBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.DeleteCloudBackupAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + */ + public Builder setDeleteCloudBackup( + com.google.spanner.executor.v1.DeleteCloudBackupAction value) { + if (deleteCloudBackupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + deleteCloudBackupBuilder_.setMessage(value); + } + actionCase_ = 22; + return this; + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + */ + public Builder setDeleteCloudBackup( + com.google.spanner.executor.v1.DeleteCloudBackupAction.Builder builderForValue) { + if (deleteCloudBackupBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + deleteCloudBackupBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 22; + return this; + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + */ + public Builder mergeDeleteCloudBackup( + com.google.spanner.executor.v1.DeleteCloudBackupAction value) { + if (deleteCloudBackupBuilder_ == null) { + if (actionCase_ == 22 + && action_ + != com.google.spanner.executor.v1.DeleteCloudBackupAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.DeleteCloudBackupAction.newBuilder( + (com.google.spanner.executor.v1.DeleteCloudBackupAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 22) { + deleteCloudBackupBuilder_.mergeFrom(value); + } else { + deleteCloudBackupBuilder_.setMessage(value); + } + } + actionCase_ = 22; + return this; + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + */ + public Builder clearDeleteCloudBackup() { + if (deleteCloudBackupBuilder_ == null) { + if (actionCase_ == 22) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 22) { + actionCase_ = 0; + action_ = null; + } + deleteCloudBackupBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + */ + public com.google.spanner.executor.v1.DeleteCloudBackupAction.Builder + getDeleteCloudBackupBuilder() { + return getDeleteCloudBackupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudBackupActionOrBuilder + getDeleteCloudBackupOrBuilder() { + if ((actionCase_ == 22) && (deleteCloudBackupBuilder_ != null)) { + return deleteCloudBackupBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 22) { + return (com.google.spanner.executor.v1.DeleteCloudBackupAction) action_; + } + return com.google.spanner.executor.v1.DeleteCloudBackupAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that deletes a Cloud Spanner database backup.
+     * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DeleteCloudBackupAction, + com.google.spanner.executor.v1.DeleteCloudBackupAction.Builder, + com.google.spanner.executor.v1.DeleteCloudBackupActionOrBuilder> + getDeleteCloudBackupFieldBuilder() { + if (deleteCloudBackupBuilder_ == null) { + if (!(actionCase_ == 22)) { + action_ = com.google.spanner.executor.v1.DeleteCloudBackupAction.getDefaultInstance(); + } + deleteCloudBackupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DeleteCloudBackupAction, + com.google.spanner.executor.v1.DeleteCloudBackupAction.Builder, + com.google.spanner.executor.v1.DeleteCloudBackupActionOrBuilder>( + (com.google.spanner.executor.v1.DeleteCloudBackupAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 22; + onChanged(); + return deleteCloudBackupBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudBackupsAction, + com.google.spanner.executor.v1.ListCloudBackupsAction.Builder, + com.google.spanner.executor.v1.ListCloudBackupsActionOrBuilder> + listCloudBackupsBuilder_; + /** + * + * + *
+     * Action that lists Cloud Spanner database backups.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + * + * @return Whether the listCloudBackups field is set. + */ + @java.lang.Override + public boolean hasListCloudBackups() { + return actionCase_ == 23; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backups.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + * + * @return The listCloudBackups. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupsAction getListCloudBackups() { + if (listCloudBackupsBuilder_ == null) { + if (actionCase_ == 23) { + return (com.google.spanner.executor.v1.ListCloudBackupsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudBackupsAction.getDefaultInstance(); + } else { + if (actionCase_ == 23) { + return listCloudBackupsBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ListCloudBackupsAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backups.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + */ + public Builder setListCloudBackups( + com.google.spanner.executor.v1.ListCloudBackupsAction value) { + if (listCloudBackupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + listCloudBackupsBuilder_.setMessage(value); + } + actionCase_ = 23; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backups.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + */ + public Builder setListCloudBackups( + com.google.spanner.executor.v1.ListCloudBackupsAction.Builder builderForValue) { + if (listCloudBackupsBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + listCloudBackupsBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 23; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backups.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + */ + public Builder mergeListCloudBackups( + com.google.spanner.executor.v1.ListCloudBackupsAction value) { + if (listCloudBackupsBuilder_ == null) { + if (actionCase_ == 23 + && action_ + != com.google.spanner.executor.v1.ListCloudBackupsAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.ListCloudBackupsAction.newBuilder( + (com.google.spanner.executor.v1.ListCloudBackupsAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 23) { + listCloudBackupsBuilder_.mergeFrom(value); + } else { + listCloudBackupsBuilder_.setMessage(value); + } + } + actionCase_ = 23; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backups.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + */ + public Builder clearListCloudBackups() { + if (listCloudBackupsBuilder_ == null) { + if (actionCase_ == 23) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 23) { + actionCase_ = 0; + action_ = null; + } + listCloudBackupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backups.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + */ + public com.google.spanner.executor.v1.ListCloudBackupsAction.Builder + getListCloudBackupsBuilder() { + return getListCloudBackupsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backups.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupsActionOrBuilder + getListCloudBackupsOrBuilder() { + if ((actionCase_ == 23) && (listCloudBackupsBuilder_ != null)) { + return listCloudBackupsBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 23) { + return (com.google.spanner.executor.v1.ListCloudBackupsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudBackupsAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backups.
+     * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudBackupsAction, + com.google.spanner.executor.v1.ListCloudBackupsAction.Builder, + com.google.spanner.executor.v1.ListCloudBackupsActionOrBuilder> + getListCloudBackupsFieldBuilder() { + if (listCloudBackupsBuilder_ == null) { + if (!(actionCase_ == 23)) { + action_ = com.google.spanner.executor.v1.ListCloudBackupsAction.getDefaultInstance(); + } + listCloudBackupsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudBackupsAction, + com.google.spanner.executor.v1.ListCloudBackupsAction.Builder, + com.google.spanner.executor.v1.ListCloudBackupsActionOrBuilder>( + (com.google.spanner.executor.v1.ListCloudBackupsAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 23; + onChanged(); + return listCloudBackupsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudBackupOperationsAction, + com.google.spanner.executor.v1.ListCloudBackupOperationsAction.Builder, + com.google.spanner.executor.v1.ListCloudBackupOperationsActionOrBuilder> + listCloudBackupOperationsBuilder_; + /** + * + * + *
+     * Action that lists Cloud Spanner database backup operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + * + * @return Whether the listCloudBackupOperations field is set. + */ + @java.lang.Override + public boolean hasListCloudBackupOperations() { + return actionCase_ == 24; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backup operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + * + * @return The listCloudBackupOperations. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupOperationsAction + getListCloudBackupOperations() { + if (listCloudBackupOperationsBuilder_ == null) { + if (actionCase_ == 24) { + return (com.google.spanner.executor.v1.ListCloudBackupOperationsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudBackupOperationsAction.getDefaultInstance(); + } else { + if (actionCase_ == 24) { + return listCloudBackupOperationsBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ListCloudBackupOperationsAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backup operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + */ + public Builder setListCloudBackupOperations( + com.google.spanner.executor.v1.ListCloudBackupOperationsAction value) { + if (listCloudBackupOperationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + listCloudBackupOperationsBuilder_.setMessage(value); + } + actionCase_ = 24; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backup operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + */ + public Builder setListCloudBackupOperations( + com.google.spanner.executor.v1.ListCloudBackupOperationsAction.Builder builderForValue) { + if (listCloudBackupOperationsBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + listCloudBackupOperationsBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 24; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backup operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + */ + public Builder mergeListCloudBackupOperations( + com.google.spanner.executor.v1.ListCloudBackupOperationsAction value) { + if (listCloudBackupOperationsBuilder_ == null) { + if (actionCase_ == 24 + && action_ + != com.google.spanner.executor.v1.ListCloudBackupOperationsAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.ListCloudBackupOperationsAction.newBuilder( + (com.google.spanner.executor.v1.ListCloudBackupOperationsAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 24) { + listCloudBackupOperationsBuilder_.mergeFrom(value); + } else { + listCloudBackupOperationsBuilder_.setMessage(value); + } + } + actionCase_ = 24; + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backup operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + */ + public Builder clearListCloudBackupOperations() { + if (listCloudBackupOperationsBuilder_ == null) { + if (actionCase_ == 24) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 24) { + actionCase_ = 0; + action_ = null; + } + listCloudBackupOperationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backup operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + */ + public com.google.spanner.executor.v1.ListCloudBackupOperationsAction.Builder + getListCloudBackupOperationsBuilder() { + return getListCloudBackupOperationsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backup operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupOperationsActionOrBuilder + getListCloudBackupOperationsOrBuilder() { + if ((actionCase_ == 24) && (listCloudBackupOperationsBuilder_ != null)) { + return listCloudBackupOperationsBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 24) { + return (com.google.spanner.executor.v1.ListCloudBackupOperationsAction) action_; + } + return com.google.spanner.executor.v1.ListCloudBackupOperationsAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that lists Cloud Spanner database backup operations.
+     * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudBackupOperationsAction, + com.google.spanner.executor.v1.ListCloudBackupOperationsAction.Builder, + com.google.spanner.executor.v1.ListCloudBackupOperationsActionOrBuilder> + getListCloudBackupOperationsFieldBuilder() { + if (listCloudBackupOperationsBuilder_ == null) { + if (!(actionCase_ == 24)) { + action_ = + com.google.spanner.executor.v1.ListCloudBackupOperationsAction.getDefaultInstance(); + } + listCloudBackupOperationsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ListCloudBackupOperationsAction, + com.google.spanner.executor.v1.ListCloudBackupOperationsAction.Builder, + com.google.spanner.executor.v1.ListCloudBackupOperationsActionOrBuilder>( + (com.google.spanner.executor.v1.ListCloudBackupOperationsAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 24; + onChanged(); + return listCloudBackupOperationsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetOperationAction, + com.google.spanner.executor.v1.GetOperationAction.Builder, + com.google.spanner.executor.v1.GetOperationActionOrBuilder> + getOperationBuilder_; + /** + * + * + *
+     * Action that gets an operation.
+     * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + * + * @return Whether the getOperation field is set. + */ + @java.lang.Override + public boolean hasGetOperation() { + return actionCase_ == 25; + } + /** + * + * + *
+     * Action that gets an operation.
+     * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + * + * @return The getOperation. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetOperationAction getGetOperation() { + if (getOperationBuilder_ == null) { + if (actionCase_ == 25) { + return (com.google.spanner.executor.v1.GetOperationAction) action_; + } + return com.google.spanner.executor.v1.GetOperationAction.getDefaultInstance(); + } else { + if (actionCase_ == 25) { + return getOperationBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.GetOperationAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that gets an operation.
+     * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + */ + public Builder setGetOperation(com.google.spanner.executor.v1.GetOperationAction value) { + if (getOperationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + getOperationBuilder_.setMessage(value); + } + actionCase_ = 25; + return this; + } + /** + * + * + *
+     * Action that gets an operation.
+     * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + */ + public Builder setGetOperation( + com.google.spanner.executor.v1.GetOperationAction.Builder builderForValue) { + if (getOperationBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + getOperationBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 25; + return this; + } + /** + * + * + *
+     * Action that gets an operation.
+     * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + */ + public Builder mergeGetOperation(com.google.spanner.executor.v1.GetOperationAction value) { + if (getOperationBuilder_ == null) { + if (actionCase_ == 25 + && action_ != com.google.spanner.executor.v1.GetOperationAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.GetOperationAction.newBuilder( + (com.google.spanner.executor.v1.GetOperationAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 25) { + getOperationBuilder_.mergeFrom(value); + } else { + getOperationBuilder_.setMessage(value); + } + } + actionCase_ = 25; + return this; + } + /** + * + * + *
+     * Action that gets an operation.
+     * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + */ + public Builder clearGetOperation() { + if (getOperationBuilder_ == null) { + if (actionCase_ == 25) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 25) { + actionCase_ = 0; + action_ = null; + } + getOperationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that gets an operation.
+     * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + */ + public com.google.spanner.executor.v1.GetOperationAction.Builder getGetOperationBuilder() { + return getGetOperationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that gets an operation.
+     * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + */ + @java.lang.Override + public com.google.spanner.executor.v1.GetOperationActionOrBuilder getGetOperationOrBuilder() { + if ((actionCase_ == 25) && (getOperationBuilder_ != null)) { + return getOperationBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 25) { + return (com.google.spanner.executor.v1.GetOperationAction) action_; + } + return com.google.spanner.executor.v1.GetOperationAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that gets an operation.
+     * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetOperationAction, + com.google.spanner.executor.v1.GetOperationAction.Builder, + com.google.spanner.executor.v1.GetOperationActionOrBuilder> + getGetOperationFieldBuilder() { + if (getOperationBuilder_ == null) { + if (!(actionCase_ == 25)) { + action_ = com.google.spanner.executor.v1.GetOperationAction.getDefaultInstance(); + } + getOperationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GetOperationAction, + com.google.spanner.executor.v1.GetOperationAction.Builder, + com.google.spanner.executor.v1.GetOperationActionOrBuilder>( + (com.google.spanner.executor.v1.GetOperationAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 25; + onChanged(); + return getOperationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CancelOperationAction, + com.google.spanner.executor.v1.CancelOperationAction.Builder, + com.google.spanner.executor.v1.CancelOperationActionOrBuilder> + cancelOperationBuilder_; + /** + * + * + *
+     * Action that cancels an operation.
+     * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + * + * @return Whether the cancelOperation field is set. + */ + @java.lang.Override + public boolean hasCancelOperation() { + return actionCase_ == 26; + } + /** + * + * + *
+     * Action that cancels an operation.
+     * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + * + * @return The cancelOperation. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CancelOperationAction getCancelOperation() { + if (cancelOperationBuilder_ == null) { + if (actionCase_ == 26) { + return (com.google.spanner.executor.v1.CancelOperationAction) action_; + } + return com.google.spanner.executor.v1.CancelOperationAction.getDefaultInstance(); + } else { + if (actionCase_ == 26) { + return cancelOperationBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.CancelOperationAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that cancels an operation.
+     * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + */ + public Builder setCancelOperation(com.google.spanner.executor.v1.CancelOperationAction value) { + if (cancelOperationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + cancelOperationBuilder_.setMessage(value); + } + actionCase_ = 26; + return this; + } + /** + * + * + *
+     * Action that cancels an operation.
+     * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + */ + public Builder setCancelOperation( + com.google.spanner.executor.v1.CancelOperationAction.Builder builderForValue) { + if (cancelOperationBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + cancelOperationBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 26; + return this; + } + /** + * + * + *
+     * Action that cancels an operation.
+     * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + */ + public Builder mergeCancelOperation( + com.google.spanner.executor.v1.CancelOperationAction value) { + if (cancelOperationBuilder_ == null) { + if (actionCase_ == 26 + && action_ + != com.google.spanner.executor.v1.CancelOperationAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.CancelOperationAction.newBuilder( + (com.google.spanner.executor.v1.CancelOperationAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 26) { + cancelOperationBuilder_.mergeFrom(value); + } else { + cancelOperationBuilder_.setMessage(value); + } + } + actionCase_ = 26; + return this; + } + /** + * + * + *
+     * Action that cancels an operation.
+     * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + */ + public Builder clearCancelOperation() { + if (cancelOperationBuilder_ == null) { + if (actionCase_ == 26) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 26) { + actionCase_ = 0; + action_ = null; + } + cancelOperationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that cancels an operation.
+     * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + */ + public com.google.spanner.executor.v1.CancelOperationAction.Builder + getCancelOperationBuilder() { + return getCancelOperationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that cancels an operation.
+     * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CancelOperationActionOrBuilder + getCancelOperationOrBuilder() { + if ((actionCase_ == 26) && (cancelOperationBuilder_ != null)) { + return cancelOperationBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 26) { + return (com.google.spanner.executor.v1.CancelOperationAction) action_; + } + return com.google.spanner.executor.v1.CancelOperationAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that cancels an operation.
+     * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CancelOperationAction, + com.google.spanner.executor.v1.CancelOperationAction.Builder, + com.google.spanner.executor.v1.CancelOperationActionOrBuilder> + getCancelOperationFieldBuilder() { + if (cancelOperationBuilder_ == null) { + if (!(actionCase_ == 26)) { + action_ = com.google.spanner.executor.v1.CancelOperationAction.getDefaultInstance(); + } + cancelOperationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CancelOperationAction, + com.google.spanner.executor.v1.CancelOperationAction.Builder, + com.google.spanner.executor.v1.CancelOperationActionOrBuilder>( + (com.google.spanner.executor.v1.CancelOperationAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 26; + onChanged(); + return cancelOperationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction, + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder> + reconfigureCloudDatabaseBuilder_; + /** + * + * + *
+     * Action that reconfigures a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + * + * @return Whether the reconfigureCloudDatabase field is set. + */ + @java.lang.Override + public boolean hasReconfigureCloudDatabase() { + return actionCase_ == 28; + } + /** + * + * + *
+     * Action that reconfigures a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + * + * @return The reconfigureCloudDatabase. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction + getReconfigureCloudDatabase() { + if (reconfigureCloudDatabaseBuilder_ == null) { + if (actionCase_ == 28) { + return (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + } else { + if (actionCase_ == 28) { + return reconfigureCloudDatabaseBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that reconfigures a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + */ + public Builder setReconfigureCloudDatabase( + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction value) { + if (reconfigureCloudDatabaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + reconfigureCloudDatabaseBuilder_.setMessage(value); + } + actionCase_ = 28; + return this; + } + /** + * + * + *
+     * Action that reconfigures a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + */ + public Builder setReconfigureCloudDatabase( + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder builderForValue) { + if (reconfigureCloudDatabaseBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + reconfigureCloudDatabaseBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 28; + return this; + } + /** + * + * + *
+     * Action that reconfigures a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + */ + public Builder mergeReconfigureCloudDatabase( + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction value) { + if (reconfigureCloudDatabaseBuilder_ == null) { + if (actionCase_ == 28 + && action_ + != com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.newBuilder( + (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 28) { + reconfigureCloudDatabaseBuilder_.mergeFrom(value); + } else { + reconfigureCloudDatabaseBuilder_.setMessage(value); + } + } + actionCase_ = 28; + return this; + } + /** + * + * + *
+     * Action that reconfigures a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + */ + public Builder clearReconfigureCloudDatabase() { + if (reconfigureCloudDatabaseBuilder_ == null) { + if (actionCase_ == 28) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 28) { + actionCase_ = 0; + action_ = null; + } + reconfigureCloudDatabaseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that reconfigures a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + */ + public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder + getReconfigureCloudDatabaseBuilder() { + return getReconfigureCloudDatabaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that reconfigures a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder + getReconfigureCloudDatabaseOrBuilder() { + if ((actionCase_ == 28) && (reconfigureCloudDatabaseBuilder_ != null)) { + return reconfigureCloudDatabaseBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 28) { + return (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_; + } + return com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that reconfigures a Cloud Spanner database.
+     * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction, + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder> + getReconfigureCloudDatabaseFieldBuilder() { + if (reconfigureCloudDatabaseBuilder_ == null) { + if (!(actionCase_ == 28)) { + action_ = + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + } + reconfigureCloudDatabaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction, + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder, + com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder>( + (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 28; + onChanged(); + return reconfigureCloudDatabaseBuilder_; + } + + @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.executor.v1.AdminAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.AdminAction) + private static final com.google.spanner.executor.v1.AdminAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.AdminAction(); + } + + public static com.google.spanner.executor.v1.AdminAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdminAction 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.executor.v1.AdminAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminActionOrBuilder.java new file mode 100644 index 00000000000..c8684d19270 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminActionOrBuilder.java @@ -0,0 +1,1070 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface AdminActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.AdminAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Action that creates a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + * + * @return Whether the createUserInstanceConfig field is set. + */ + boolean hasCreateUserInstanceConfig(); + /** + * + * + *
+   * Action that creates a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + * + * @return The createUserInstanceConfig. + */ + com.google.spanner.executor.v1.CreateUserInstanceConfigAction getCreateUserInstanceConfig(); + /** + * + * + *
+   * Action that creates a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.CreateUserInstanceConfigAction create_user_instance_config = 1; + * + */ + com.google.spanner.executor.v1.CreateUserInstanceConfigActionOrBuilder + getCreateUserInstanceConfigOrBuilder(); + + /** + * + * + *
+   * Action that updates a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + * + * @return Whether the updateUserInstanceConfig field is set. + */ + boolean hasUpdateUserInstanceConfig(); + /** + * + * + *
+   * Action that updates a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + * + * @return The updateUserInstanceConfig. + */ + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction getUpdateUserInstanceConfig(); + /** + * + * + *
+   * Action that updates a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.UpdateUserInstanceConfigAction update_user_instance_config = 2; + * + */ + com.google.spanner.executor.v1.UpdateUserInstanceConfigActionOrBuilder + getUpdateUserInstanceConfigOrBuilder(); + + /** + * + * + *
+   * Action that deletes a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + * + * @return Whether the deleteUserInstanceConfig field is set. + */ + boolean hasDeleteUserInstanceConfig(); + /** + * + * + *
+   * Action that deletes a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + * + * @return The deleteUserInstanceConfig. + */ + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction getDeleteUserInstanceConfig(); + /** + * + * + *
+   * Action that deletes a user instance config.
+   * 
+ * + * + * .google.spanner.executor.v1.DeleteUserInstanceConfigAction delete_user_instance_config = 3; + * + */ + com.google.spanner.executor.v1.DeleteUserInstanceConfigActionOrBuilder + getDeleteUserInstanceConfigOrBuilder(); + + /** + * + * + *
+   * Action that gets a user instance config.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + * + * @return Whether the getCloudInstanceConfig field is set. + */ + boolean hasGetCloudInstanceConfig(); + /** + * + * + *
+   * Action that gets a user instance config.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + * + * @return The getCloudInstanceConfig. + */ + com.google.spanner.executor.v1.GetCloudInstanceConfigAction getGetCloudInstanceConfig(); + /** + * + * + *
+   * Action that gets a user instance config.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceConfigAction get_cloud_instance_config = 4; + * + */ + com.google.spanner.executor.v1.GetCloudInstanceConfigActionOrBuilder + getGetCloudInstanceConfigOrBuilder(); + + /** + * + * + *
+   * Action that lists user instance configs.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + * + * @return Whether the listInstanceConfigs field is set. + */ + boolean hasListInstanceConfigs(); + /** + * + * + *
+   * Action that lists user instance configs.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + * + * @return The listInstanceConfigs. + */ + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction getListInstanceConfigs(); + /** + * + * + *
+   * Action that lists user instance configs.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudInstanceConfigsAction list_instance_configs = 5; + * + */ + com.google.spanner.executor.v1.ListCloudInstanceConfigsActionOrBuilder + getListInstanceConfigsOrBuilder(); + + /** + * + * + *
+   * Action that creates a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + * + * @return Whether the createCloudInstance field is set. + */ + boolean hasCreateCloudInstance(); + /** + * + * + *
+   * Action that creates a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + * + * @return The createCloudInstance. + */ + com.google.spanner.executor.v1.CreateCloudInstanceAction getCreateCloudInstance(); + /** + * + * + *
+   * Action that creates a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudInstanceAction create_cloud_instance = 6; + */ + com.google.spanner.executor.v1.CreateCloudInstanceActionOrBuilder + getCreateCloudInstanceOrBuilder(); + + /** + * + * + *
+   * Action that updates a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + * + * @return Whether the updateCloudInstance field is set. + */ + boolean hasUpdateCloudInstance(); + /** + * + * + *
+   * Action that updates a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + * + * @return The updateCloudInstance. + */ + com.google.spanner.executor.v1.UpdateCloudInstanceAction getUpdateCloudInstance(); + /** + * + * + *
+   * Action that updates a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudInstanceAction update_cloud_instance = 7; + */ + com.google.spanner.executor.v1.UpdateCloudInstanceActionOrBuilder + getUpdateCloudInstanceOrBuilder(); + + /** + * + * + *
+   * Action that deletes a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + * + * @return Whether the deleteCloudInstance field is set. + */ + boolean hasDeleteCloudInstance(); + /** + * + * + *
+   * Action that deletes a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + * + * @return The deleteCloudInstance. + */ + com.google.spanner.executor.v1.DeleteCloudInstanceAction getDeleteCloudInstance(); + /** + * + * + *
+   * Action that deletes a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.DeleteCloudInstanceAction delete_cloud_instance = 8; + */ + com.google.spanner.executor.v1.DeleteCloudInstanceActionOrBuilder + getDeleteCloudInstanceOrBuilder(); + + /** + * + * + *
+   * Action that lists Cloud Spanner instances.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + * + * @return Whether the listCloudInstances field is set. + */ + boolean hasListCloudInstances(); + /** + * + * + *
+   * Action that lists Cloud Spanner instances.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + * + * @return The listCloudInstances. + */ + com.google.spanner.executor.v1.ListCloudInstancesAction getListCloudInstances(); + /** + * + * + *
+   * Action that lists Cloud Spanner instances.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudInstancesAction list_cloud_instances = 9; + */ + com.google.spanner.executor.v1.ListCloudInstancesActionOrBuilder getListCloudInstancesOrBuilder(); + + /** + * + * + *
+   * Action that retrieves a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + * + * @return Whether the getCloudInstance field is set. + */ + boolean hasGetCloudInstance(); + /** + * + * + *
+   * Action that retrieves a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + * + * @return The getCloudInstance. + */ + com.google.spanner.executor.v1.GetCloudInstanceAction getGetCloudInstance(); + /** + * + * + *
+   * Action that retrieves a Cloud Spanner instance.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudInstanceAction get_cloud_instance = 10; + */ + com.google.spanner.executor.v1.GetCloudInstanceActionOrBuilder getGetCloudInstanceOrBuilder(); + + /** + * + * + *
+   * Action that creates a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + * @return Whether the createCloudDatabase field is set. + */ + boolean hasCreateCloudDatabase(); + /** + * + * + *
+   * Action that creates a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + * + * @return The createCloudDatabase. + */ + com.google.spanner.executor.v1.CreateCloudDatabaseAction getCreateCloudDatabase(); + /** + * + * + *
+   * Action that creates a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudDatabaseAction create_cloud_database = 11; + */ + com.google.spanner.executor.v1.CreateCloudDatabaseActionOrBuilder + getCreateCloudDatabaseOrBuilder(); + + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + * + * @return Whether the updateCloudDatabaseDdl field is set. + */ + boolean hasUpdateCloudDatabaseDdl(); + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + * + * @return The updateCloudDatabaseDdl. + */ + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction getUpdateCloudDatabaseDdl(); + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + * + */ + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlActionOrBuilder + getUpdateCloudDatabaseDdlOrBuilder(); + + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + * @return Whether the updateCloudDatabase field is set. + */ + boolean hasUpdateCloudDatabase(); + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + * + * @return The updateCloudDatabase. + */ + com.google.spanner.executor.v1.UpdateCloudDatabaseAction getUpdateCloudDatabase(); + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudDatabaseAction update_cloud_database = 27; + */ + com.google.spanner.executor.v1.UpdateCloudDatabaseActionOrBuilder + getUpdateCloudDatabaseOrBuilder(); + + /** + * + * + *
+   * Action that drops a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + * + * @return Whether the dropCloudDatabase field is set. + */ + boolean hasDropCloudDatabase(); + /** + * + * + *
+   * Action that drops a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + * + * @return The dropCloudDatabase. + */ + com.google.spanner.executor.v1.DropCloudDatabaseAction getDropCloudDatabase(); + /** + * + * + *
+   * Action that drops a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.DropCloudDatabaseAction drop_cloud_database = 13; + */ + com.google.spanner.executor.v1.DropCloudDatabaseActionOrBuilder getDropCloudDatabaseOrBuilder(); + + /** + * + * + *
+   * Action that lists Cloud Spanner databases.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + * + * @return Whether the listCloudDatabases field is set. + */ + boolean hasListCloudDatabases(); + /** + * + * + *
+   * Action that lists Cloud Spanner databases.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + * + * @return The listCloudDatabases. + */ + com.google.spanner.executor.v1.ListCloudDatabasesAction getListCloudDatabases(); + /** + * + * + *
+   * Action that lists Cloud Spanner databases.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudDatabasesAction list_cloud_databases = 14; + */ + com.google.spanner.executor.v1.ListCloudDatabasesActionOrBuilder getListCloudDatabasesOrBuilder(); + + /** + * + * + *
+   * Action that lists Cloud Spanner database operations.
+   * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + * + * @return Whether the listCloudDatabaseOperations field is set. + */ + boolean hasListCloudDatabaseOperations(); + /** + * + * + *
+   * Action that lists Cloud Spanner database operations.
+   * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + * + * @return The listCloudDatabaseOperations. + */ + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction getListCloudDatabaseOperations(); + /** + * + * + *
+   * Action that lists Cloud Spanner database operations.
+   * 
+ * + * + * .google.spanner.executor.v1.ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + * + */ + com.google.spanner.executor.v1.ListCloudDatabaseOperationsActionOrBuilder + getListCloudDatabaseOperationsOrBuilder(); + + /** + * + * + *
+   * Action that restores a Cloud Spanner database from a backup.
+   * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + * + * @return Whether the restoreCloudDatabase field is set. + */ + boolean hasRestoreCloudDatabase(); + /** + * + * + *
+   * Action that restores a Cloud Spanner database from a backup.
+   * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + * + * @return The restoreCloudDatabase. + */ + com.google.spanner.executor.v1.RestoreCloudDatabaseAction getRestoreCloudDatabase(); + /** + * + * + *
+   * Action that restores a Cloud Spanner database from a backup.
+   * 
+ * + * .google.spanner.executor.v1.RestoreCloudDatabaseAction restore_cloud_database = 16; + * + */ + com.google.spanner.executor.v1.RestoreCloudDatabaseActionOrBuilder + getRestoreCloudDatabaseOrBuilder(); + + /** + * + * + *
+   * Action that gets a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + * + * @return Whether the getCloudDatabase field is set. + */ + boolean hasGetCloudDatabase(); + /** + * + * + *
+   * Action that gets a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + * + * @return The getCloudDatabase. + */ + com.google.spanner.executor.v1.GetCloudDatabaseAction getGetCloudDatabase(); + /** + * + * + *
+   * Action that gets a Cloud Spanner database.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudDatabaseAction get_cloud_database = 17; + */ + com.google.spanner.executor.v1.GetCloudDatabaseActionOrBuilder getGetCloudDatabaseOrBuilder(); + + /** + * + * + *
+   * Action that creates a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + * + * @return Whether the createCloudBackup field is set. + */ + boolean hasCreateCloudBackup(); + /** + * + * + *
+   * Action that creates a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + * + * @return The createCloudBackup. + */ + com.google.spanner.executor.v1.CreateCloudBackupAction getCreateCloudBackup(); + /** + * + * + *
+   * Action that creates a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.CreateCloudBackupAction create_cloud_backup = 18; + */ + com.google.spanner.executor.v1.CreateCloudBackupActionOrBuilder getCreateCloudBackupOrBuilder(); + + /** + * + * + *
+   * Action that copies a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + * + * @return Whether the copyCloudBackup field is set. + */ + boolean hasCopyCloudBackup(); + /** + * + * + *
+   * Action that copies a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + * + * @return The copyCloudBackup. + */ + com.google.spanner.executor.v1.CopyCloudBackupAction getCopyCloudBackup(); + /** + * + * + *
+   * Action that copies a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.CopyCloudBackupAction copy_cloud_backup = 19; + */ + com.google.spanner.executor.v1.CopyCloudBackupActionOrBuilder getCopyCloudBackupOrBuilder(); + + /** + * + * + *
+   * Action that gets a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + * + * @return Whether the getCloudBackup field is set. + */ + boolean hasGetCloudBackup(); + /** + * + * + *
+   * Action that gets a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + * + * @return The getCloudBackup. + */ + com.google.spanner.executor.v1.GetCloudBackupAction getGetCloudBackup(); + /** + * + * + *
+   * Action that gets a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.GetCloudBackupAction get_cloud_backup = 20; + */ + com.google.spanner.executor.v1.GetCloudBackupActionOrBuilder getGetCloudBackupOrBuilder(); + + /** + * + * + *
+   * Action that updates a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + * + * @return Whether the updateCloudBackup field is set. + */ + boolean hasUpdateCloudBackup(); + /** + * + * + *
+   * Action that updates a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + * + * @return The updateCloudBackup. + */ + com.google.spanner.executor.v1.UpdateCloudBackupAction getUpdateCloudBackup(); + /** + * + * + *
+   * Action that updates a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.UpdateCloudBackupAction update_cloud_backup = 21; + */ + com.google.spanner.executor.v1.UpdateCloudBackupActionOrBuilder getUpdateCloudBackupOrBuilder(); + + /** + * + * + *
+   * Action that deletes a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + * + * @return Whether the deleteCloudBackup field is set. + */ + boolean hasDeleteCloudBackup(); + /** + * + * + *
+   * Action that deletes a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + * + * @return The deleteCloudBackup. + */ + com.google.spanner.executor.v1.DeleteCloudBackupAction getDeleteCloudBackup(); + /** + * + * + *
+   * Action that deletes a Cloud Spanner database backup.
+   * 
+ * + * .google.spanner.executor.v1.DeleteCloudBackupAction delete_cloud_backup = 22; + */ + com.google.spanner.executor.v1.DeleteCloudBackupActionOrBuilder getDeleteCloudBackupOrBuilder(); + + /** + * + * + *
+   * Action that lists Cloud Spanner database backups.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + * + * @return Whether the listCloudBackups field is set. + */ + boolean hasListCloudBackups(); + /** + * + * + *
+   * Action that lists Cloud Spanner database backups.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + * + * @return The listCloudBackups. + */ + com.google.spanner.executor.v1.ListCloudBackupsAction getListCloudBackups(); + /** + * + * + *
+   * Action that lists Cloud Spanner database backups.
+   * 
+ * + * .google.spanner.executor.v1.ListCloudBackupsAction list_cloud_backups = 23; + */ + com.google.spanner.executor.v1.ListCloudBackupsActionOrBuilder getListCloudBackupsOrBuilder(); + + /** + * + * + *
+   * Action that lists Cloud Spanner database backup operations.
+   * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + * + * @return Whether the listCloudBackupOperations field is set. + */ + boolean hasListCloudBackupOperations(); + /** + * + * + *
+   * Action that lists Cloud Spanner database backup operations.
+   * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + * + * @return The listCloudBackupOperations. + */ + com.google.spanner.executor.v1.ListCloudBackupOperationsAction getListCloudBackupOperations(); + /** + * + * + *
+   * Action that lists Cloud Spanner database backup operations.
+   * 
+ * + * + * .google.spanner.executor.v1.ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + * + */ + com.google.spanner.executor.v1.ListCloudBackupOperationsActionOrBuilder + getListCloudBackupOperationsOrBuilder(); + + /** + * + * + *
+   * Action that gets an operation.
+   * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + * + * @return Whether the getOperation field is set. + */ + boolean hasGetOperation(); + /** + * + * + *
+   * Action that gets an operation.
+   * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + * + * @return The getOperation. + */ + com.google.spanner.executor.v1.GetOperationAction getGetOperation(); + /** + * + * + *
+   * Action that gets an operation.
+   * 
+ * + * .google.spanner.executor.v1.GetOperationAction get_operation = 25; + */ + com.google.spanner.executor.v1.GetOperationActionOrBuilder getGetOperationOrBuilder(); + + /** + * + * + *
+   * Action that cancels an operation.
+   * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + * + * @return Whether the cancelOperation field is set. + */ + boolean hasCancelOperation(); + /** + * + * + *
+   * Action that cancels an operation.
+   * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + * + * @return The cancelOperation. + */ + com.google.spanner.executor.v1.CancelOperationAction getCancelOperation(); + /** + * + * + *
+   * Action that cancels an operation.
+   * 
+ * + * .google.spanner.executor.v1.CancelOperationAction cancel_operation = 26; + */ + com.google.spanner.executor.v1.CancelOperationActionOrBuilder getCancelOperationOrBuilder(); + + /** + * + * + *
+   * Action that reconfigures a Cloud Spanner database.
+   * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + * + * @return Whether the reconfigureCloudDatabase field is set. + */ + boolean hasReconfigureCloudDatabase(); + /** + * + * + *
+   * Action that reconfigures a Cloud Spanner database.
+   * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + * + * @return The reconfigureCloudDatabase. + */ + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction getReconfigureCloudDatabase(); + /** + * + * + *
+   * Action that reconfigures a Cloud Spanner database.
+   * 
+ * + * + * .google.spanner.executor.v1.ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + * + */ + com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder + getReconfigureCloudDatabaseOrBuilder(); + + com.google.spanner.executor.v1.AdminAction.ActionCase getActionCase(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminResult.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminResult.java new file mode 100644 index 00000000000..d88a95bf2ea --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminResult.java @@ -0,0 +1,1812 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * AdminResult contains admin action results, for database/backup/operation.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.AdminResult} + */ +public final class AdminResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.AdminResult) + AdminResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use AdminResult.newBuilder() to construct. + private AdminResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AdminResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AdminResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdminResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdminResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.AdminResult.class, + com.google.spanner.executor.v1.AdminResult.Builder.class); + } + + public static final int BACKUP_RESPONSE_FIELD_NUMBER = 1; + private com.google.spanner.executor.v1.CloudBackupResponse backupResponse_; + /** + * + * + *
+   * Results of cloud backup related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + * + * @return Whether the backupResponse field is set. + */ + @java.lang.Override + public boolean hasBackupResponse() { + return backupResponse_ != null; + } + /** + * + * + *
+   * Results of cloud backup related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + * + * @return The backupResponse. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CloudBackupResponse getBackupResponse() { + return backupResponse_ == null + ? com.google.spanner.executor.v1.CloudBackupResponse.getDefaultInstance() + : backupResponse_; + } + /** + * + * + *
+   * Results of cloud backup related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CloudBackupResponseOrBuilder getBackupResponseOrBuilder() { + return backupResponse_ == null + ? com.google.spanner.executor.v1.CloudBackupResponse.getDefaultInstance() + : backupResponse_; + } + + public static final int OPERATION_RESPONSE_FIELD_NUMBER = 2; + private com.google.spanner.executor.v1.OperationResponse operationResponse_; + /** + * + * + *
+   * Results of operation related actions.
+   * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + * + * @return Whether the operationResponse field is set. + */ + @java.lang.Override + public boolean hasOperationResponse() { + return operationResponse_ != null; + } + /** + * + * + *
+   * Results of operation related actions.
+   * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + * + * @return The operationResponse. + */ + @java.lang.Override + public com.google.spanner.executor.v1.OperationResponse getOperationResponse() { + return operationResponse_ == null + ? com.google.spanner.executor.v1.OperationResponse.getDefaultInstance() + : operationResponse_; + } + /** + * + * + *
+   * Results of operation related actions.
+   * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.OperationResponseOrBuilder getOperationResponseOrBuilder() { + return operationResponse_ == null + ? com.google.spanner.executor.v1.OperationResponse.getDefaultInstance() + : operationResponse_; + } + + public static final int DATABASE_RESPONSE_FIELD_NUMBER = 3; + private com.google.spanner.executor.v1.CloudDatabaseResponse databaseResponse_; + /** + * + * + *
+   * Results of database related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + * + * @return Whether the databaseResponse field is set. + */ + @java.lang.Override + public boolean hasDatabaseResponse() { + return databaseResponse_ != null; + } + /** + * + * + *
+   * Results of database related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + * + * @return The databaseResponse. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CloudDatabaseResponse getDatabaseResponse() { + return databaseResponse_ == null + ? com.google.spanner.executor.v1.CloudDatabaseResponse.getDefaultInstance() + : databaseResponse_; + } + /** + * + * + *
+   * Results of database related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CloudDatabaseResponseOrBuilder + getDatabaseResponseOrBuilder() { + return databaseResponse_ == null + ? com.google.spanner.executor.v1.CloudDatabaseResponse.getDefaultInstance() + : databaseResponse_; + } + + public static final int INSTANCE_RESPONSE_FIELD_NUMBER = 4; + private com.google.spanner.executor.v1.CloudInstanceResponse instanceResponse_; + /** + * + * + *
+   * Results of instance related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + * + * @return Whether the instanceResponse field is set. + */ + @java.lang.Override + public boolean hasInstanceResponse() { + return instanceResponse_ != null; + } + /** + * + * + *
+   * Results of instance related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + * + * @return The instanceResponse. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CloudInstanceResponse getInstanceResponse() { + return instanceResponse_ == null + ? com.google.spanner.executor.v1.CloudInstanceResponse.getDefaultInstance() + : instanceResponse_; + } + /** + * + * + *
+   * Results of instance related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CloudInstanceResponseOrBuilder + getInstanceResponseOrBuilder() { + return instanceResponse_ == null + ? com.google.spanner.executor.v1.CloudInstanceResponse.getDefaultInstance() + : instanceResponse_; + } + + public static final int INSTANCE_CONFIG_RESPONSE_FIELD_NUMBER = 5; + private com.google.spanner.executor.v1.CloudInstanceConfigResponse instanceConfigResponse_; + /** + * + * + *
+   * Results of instance config related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + * + * @return Whether the instanceConfigResponse field is set. + */ + @java.lang.Override + public boolean hasInstanceConfigResponse() { + return instanceConfigResponse_ != null; + } + /** + * + * + *
+   * Results of instance config related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + * + * @return The instanceConfigResponse. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CloudInstanceConfigResponse getInstanceConfigResponse() { + return instanceConfigResponse_ == null + ? com.google.spanner.executor.v1.CloudInstanceConfigResponse.getDefaultInstance() + : instanceConfigResponse_; + } + /** + * + * + *
+   * Results of instance config related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.CloudInstanceConfigResponseOrBuilder + getInstanceConfigResponseOrBuilder() { + return instanceConfigResponse_ == null + ? com.google.spanner.executor.v1.CloudInstanceConfigResponse.getDefaultInstance() + : instanceConfigResponse_; + } + + 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 (backupResponse_ != null) { + output.writeMessage(1, getBackupResponse()); + } + if (operationResponse_ != null) { + output.writeMessage(2, getOperationResponse()); + } + if (databaseResponse_ != null) { + output.writeMessage(3, getDatabaseResponse()); + } + if (instanceResponse_ != null) { + output.writeMessage(4, getInstanceResponse()); + } + if (instanceConfigResponse_ != null) { + output.writeMessage(5, getInstanceConfigResponse()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (backupResponse_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBackupResponse()); + } + if (operationResponse_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOperationResponse()); + } + if (databaseResponse_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDatabaseResponse()); + } + if (instanceResponse_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getInstanceResponse()); + } + if (instanceConfigResponse_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInstanceConfigResponse()); + } + 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.executor.v1.AdminResult)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.AdminResult other = + (com.google.spanner.executor.v1.AdminResult) obj; + + if (hasBackupResponse() != other.hasBackupResponse()) return false; + if (hasBackupResponse()) { + if (!getBackupResponse().equals(other.getBackupResponse())) return false; + } + if (hasOperationResponse() != other.hasOperationResponse()) return false; + if (hasOperationResponse()) { + if (!getOperationResponse().equals(other.getOperationResponse())) return false; + } + if (hasDatabaseResponse() != other.hasDatabaseResponse()) return false; + if (hasDatabaseResponse()) { + if (!getDatabaseResponse().equals(other.getDatabaseResponse())) return false; + } + if (hasInstanceResponse() != other.hasInstanceResponse()) return false; + if (hasInstanceResponse()) { + if (!getInstanceResponse().equals(other.getInstanceResponse())) return false; + } + if (hasInstanceConfigResponse() != other.hasInstanceConfigResponse()) return false; + if (hasInstanceConfigResponse()) { + if (!getInstanceConfigResponse().equals(other.getInstanceConfigResponse())) 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 (hasBackupResponse()) { + hash = (37 * hash) + BACKUP_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getBackupResponse().hashCode(); + } + if (hasOperationResponse()) { + hash = (37 * hash) + OPERATION_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getOperationResponse().hashCode(); + } + if (hasDatabaseResponse()) { + hash = (37 * hash) + DATABASE_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseResponse().hashCode(); + } + if (hasInstanceResponse()) { + hash = (37 * hash) + INSTANCE_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getInstanceResponse().hashCode(); + } + if (hasInstanceConfigResponse()) { + hash = (37 * hash) + INSTANCE_CONFIG_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getInstanceConfigResponse().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.AdminResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.AdminResult 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.executor.v1.AdminResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.AdminResult 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.executor.v1.AdminResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.AdminResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.AdminResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.AdminResult 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.executor.v1.AdminResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.AdminResult 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.executor.v1.AdminResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.AdminResult 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.executor.v1.AdminResult 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; + } + /** + * + * + *
+   * AdminResult contains admin action results, for database/backup/operation.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.AdminResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.AdminResult) + com.google.spanner.executor.v1.AdminResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdminResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdminResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.AdminResult.class, + com.google.spanner.executor.v1.AdminResult.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.AdminResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backupResponse_ = null; + if (backupResponseBuilder_ != null) { + backupResponseBuilder_.dispose(); + backupResponseBuilder_ = null; + } + operationResponse_ = null; + if (operationResponseBuilder_ != null) { + operationResponseBuilder_.dispose(); + operationResponseBuilder_ = null; + } + databaseResponse_ = null; + if (databaseResponseBuilder_ != null) { + databaseResponseBuilder_.dispose(); + databaseResponseBuilder_ = null; + } + instanceResponse_ = null; + if (instanceResponseBuilder_ != null) { + instanceResponseBuilder_.dispose(); + instanceResponseBuilder_ = null; + } + instanceConfigResponse_ = null; + if (instanceConfigResponseBuilder_ != null) { + instanceConfigResponseBuilder_.dispose(); + instanceConfigResponseBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_AdminResult_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.AdminResult getDefaultInstanceForType() { + return com.google.spanner.executor.v1.AdminResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.AdminResult build() { + com.google.spanner.executor.v1.AdminResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.AdminResult buildPartial() { + com.google.spanner.executor.v1.AdminResult result = + new com.google.spanner.executor.v1.AdminResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.AdminResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.backupResponse_ = + backupResponseBuilder_ == null ? backupResponse_ : backupResponseBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.operationResponse_ = + operationResponseBuilder_ == null + ? operationResponse_ + : operationResponseBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.databaseResponse_ = + databaseResponseBuilder_ == null ? databaseResponse_ : databaseResponseBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.instanceResponse_ = + instanceResponseBuilder_ == null ? instanceResponse_ : instanceResponseBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.instanceConfigResponse_ = + instanceConfigResponseBuilder_ == null + ? instanceConfigResponse_ + : instanceConfigResponseBuilder_.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.executor.v1.AdminResult) { + return mergeFrom((com.google.spanner.executor.v1.AdminResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.AdminResult other) { + if (other == com.google.spanner.executor.v1.AdminResult.getDefaultInstance()) return this; + if (other.hasBackupResponse()) { + mergeBackupResponse(other.getBackupResponse()); + } + if (other.hasOperationResponse()) { + mergeOperationResponse(other.getOperationResponse()); + } + if (other.hasDatabaseResponse()) { + mergeDatabaseResponse(other.getDatabaseResponse()); + } + if (other.hasInstanceResponse()) { + mergeInstanceResponse(other.getInstanceResponse()); + } + if (other.hasInstanceConfigResponse()) { + mergeInstanceConfigResponse(other.getInstanceConfigResponse()); + } + 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: + { + input.readMessage(getBackupResponseFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getOperationResponseFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getDatabaseResponseFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getInstanceResponseFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getInstanceConfigResponseFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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.spanner.executor.v1.CloudBackupResponse backupResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloudBackupResponse, + com.google.spanner.executor.v1.CloudBackupResponse.Builder, + com.google.spanner.executor.v1.CloudBackupResponseOrBuilder> + backupResponseBuilder_; + /** + * + * + *
+     * Results of cloud backup related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + * + * @return Whether the backupResponse field is set. + */ + public boolean hasBackupResponse() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Results of cloud backup related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + * + * @return The backupResponse. + */ + public com.google.spanner.executor.v1.CloudBackupResponse getBackupResponse() { + if (backupResponseBuilder_ == null) { + return backupResponse_ == null + ? com.google.spanner.executor.v1.CloudBackupResponse.getDefaultInstance() + : backupResponse_; + } else { + return backupResponseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Results of cloud backup related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + */ + public Builder setBackupResponse(com.google.spanner.executor.v1.CloudBackupResponse value) { + if (backupResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupResponse_ = value; + } else { + backupResponseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of cloud backup related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + */ + public Builder setBackupResponse( + com.google.spanner.executor.v1.CloudBackupResponse.Builder builderForValue) { + if (backupResponseBuilder_ == null) { + backupResponse_ = builderForValue.build(); + } else { + backupResponseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of cloud backup related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + */ + public Builder mergeBackupResponse(com.google.spanner.executor.v1.CloudBackupResponse value) { + if (backupResponseBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && backupResponse_ != null + && backupResponse_ + != com.google.spanner.executor.v1.CloudBackupResponse.getDefaultInstance()) { + getBackupResponseBuilder().mergeFrom(value); + } else { + backupResponse_ = value; + } + } else { + backupResponseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of cloud backup related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + */ + public Builder clearBackupResponse() { + bitField0_ = (bitField0_ & ~0x00000001); + backupResponse_ = null; + if (backupResponseBuilder_ != null) { + backupResponseBuilder_.dispose(); + backupResponseBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Results of cloud backup related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + */ + public com.google.spanner.executor.v1.CloudBackupResponse.Builder getBackupResponseBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBackupResponseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Results of cloud backup related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + */ + public com.google.spanner.executor.v1.CloudBackupResponseOrBuilder + getBackupResponseOrBuilder() { + if (backupResponseBuilder_ != null) { + return backupResponseBuilder_.getMessageOrBuilder(); + } else { + return backupResponse_ == null + ? com.google.spanner.executor.v1.CloudBackupResponse.getDefaultInstance() + : backupResponse_; + } + } + /** + * + * + *
+     * Results of cloud backup related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloudBackupResponse, + com.google.spanner.executor.v1.CloudBackupResponse.Builder, + com.google.spanner.executor.v1.CloudBackupResponseOrBuilder> + getBackupResponseFieldBuilder() { + if (backupResponseBuilder_ == null) { + backupResponseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloudBackupResponse, + com.google.spanner.executor.v1.CloudBackupResponse.Builder, + com.google.spanner.executor.v1.CloudBackupResponseOrBuilder>( + getBackupResponse(), getParentForChildren(), isClean()); + backupResponse_ = null; + } + return backupResponseBuilder_; + } + + private com.google.spanner.executor.v1.OperationResponse operationResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.OperationResponse, + com.google.spanner.executor.v1.OperationResponse.Builder, + com.google.spanner.executor.v1.OperationResponseOrBuilder> + operationResponseBuilder_; + /** + * + * + *
+     * Results of operation related actions.
+     * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + * + * @return Whether the operationResponse field is set. + */ + public boolean hasOperationResponse() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Results of operation related actions.
+     * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + * + * @return The operationResponse. + */ + public com.google.spanner.executor.v1.OperationResponse getOperationResponse() { + if (operationResponseBuilder_ == null) { + return operationResponse_ == null + ? com.google.spanner.executor.v1.OperationResponse.getDefaultInstance() + : operationResponse_; + } else { + return operationResponseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Results of operation related actions.
+     * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + */ + public Builder setOperationResponse(com.google.spanner.executor.v1.OperationResponse value) { + if (operationResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operationResponse_ = value; + } else { + operationResponseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of operation related actions.
+     * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + */ + public Builder setOperationResponse( + com.google.spanner.executor.v1.OperationResponse.Builder builderForValue) { + if (operationResponseBuilder_ == null) { + operationResponse_ = builderForValue.build(); + } else { + operationResponseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of operation related actions.
+     * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + */ + public Builder mergeOperationResponse(com.google.spanner.executor.v1.OperationResponse value) { + if (operationResponseBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && operationResponse_ != null + && operationResponse_ + != com.google.spanner.executor.v1.OperationResponse.getDefaultInstance()) { + getOperationResponseBuilder().mergeFrom(value); + } else { + operationResponse_ = value; + } + } else { + operationResponseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of operation related actions.
+     * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + */ + public Builder clearOperationResponse() { + bitField0_ = (bitField0_ & ~0x00000002); + operationResponse_ = null; + if (operationResponseBuilder_ != null) { + operationResponseBuilder_.dispose(); + operationResponseBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Results of operation related actions.
+     * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + */ + public com.google.spanner.executor.v1.OperationResponse.Builder getOperationResponseBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOperationResponseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Results of operation related actions.
+     * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + */ + public com.google.spanner.executor.v1.OperationResponseOrBuilder + getOperationResponseOrBuilder() { + if (operationResponseBuilder_ != null) { + return operationResponseBuilder_.getMessageOrBuilder(); + } else { + return operationResponse_ == null + ? com.google.spanner.executor.v1.OperationResponse.getDefaultInstance() + : operationResponse_; + } + } + /** + * + * + *
+     * Results of operation related actions.
+     * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.OperationResponse, + com.google.spanner.executor.v1.OperationResponse.Builder, + com.google.spanner.executor.v1.OperationResponseOrBuilder> + getOperationResponseFieldBuilder() { + if (operationResponseBuilder_ == null) { + operationResponseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.OperationResponse, + com.google.spanner.executor.v1.OperationResponse.Builder, + com.google.spanner.executor.v1.OperationResponseOrBuilder>( + getOperationResponse(), getParentForChildren(), isClean()); + operationResponse_ = null; + } + return operationResponseBuilder_; + } + + private com.google.spanner.executor.v1.CloudDatabaseResponse databaseResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloudDatabaseResponse, + com.google.spanner.executor.v1.CloudDatabaseResponse.Builder, + com.google.spanner.executor.v1.CloudDatabaseResponseOrBuilder> + databaseResponseBuilder_; + /** + * + * + *
+     * Results of database related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + * + * @return Whether the databaseResponse field is set. + */ + public boolean hasDatabaseResponse() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Results of database related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + * + * @return The databaseResponse. + */ + public com.google.spanner.executor.v1.CloudDatabaseResponse getDatabaseResponse() { + if (databaseResponseBuilder_ == null) { + return databaseResponse_ == null + ? com.google.spanner.executor.v1.CloudDatabaseResponse.getDefaultInstance() + : databaseResponse_; + } else { + return databaseResponseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Results of database related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + */ + public Builder setDatabaseResponse(com.google.spanner.executor.v1.CloudDatabaseResponse value) { + if (databaseResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + databaseResponse_ = value; + } else { + databaseResponseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of database related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + */ + public Builder setDatabaseResponse( + com.google.spanner.executor.v1.CloudDatabaseResponse.Builder builderForValue) { + if (databaseResponseBuilder_ == null) { + databaseResponse_ = builderForValue.build(); + } else { + databaseResponseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of database related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + */ + public Builder mergeDatabaseResponse( + com.google.spanner.executor.v1.CloudDatabaseResponse value) { + if (databaseResponseBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && databaseResponse_ != null + && databaseResponse_ + != com.google.spanner.executor.v1.CloudDatabaseResponse.getDefaultInstance()) { + getDatabaseResponseBuilder().mergeFrom(value); + } else { + databaseResponse_ = value; + } + } else { + databaseResponseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of database related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + */ + public Builder clearDatabaseResponse() { + bitField0_ = (bitField0_ & ~0x00000004); + databaseResponse_ = null; + if (databaseResponseBuilder_ != null) { + databaseResponseBuilder_.dispose(); + databaseResponseBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Results of database related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + */ + public com.google.spanner.executor.v1.CloudDatabaseResponse.Builder + getDatabaseResponseBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDatabaseResponseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Results of database related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + */ + public com.google.spanner.executor.v1.CloudDatabaseResponseOrBuilder + getDatabaseResponseOrBuilder() { + if (databaseResponseBuilder_ != null) { + return databaseResponseBuilder_.getMessageOrBuilder(); + } else { + return databaseResponse_ == null + ? com.google.spanner.executor.v1.CloudDatabaseResponse.getDefaultInstance() + : databaseResponse_; + } + } + /** + * + * + *
+     * Results of database related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloudDatabaseResponse, + com.google.spanner.executor.v1.CloudDatabaseResponse.Builder, + com.google.spanner.executor.v1.CloudDatabaseResponseOrBuilder> + getDatabaseResponseFieldBuilder() { + if (databaseResponseBuilder_ == null) { + databaseResponseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloudDatabaseResponse, + com.google.spanner.executor.v1.CloudDatabaseResponse.Builder, + com.google.spanner.executor.v1.CloudDatabaseResponseOrBuilder>( + getDatabaseResponse(), getParentForChildren(), isClean()); + databaseResponse_ = null; + } + return databaseResponseBuilder_; + } + + private com.google.spanner.executor.v1.CloudInstanceResponse instanceResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloudInstanceResponse, + com.google.spanner.executor.v1.CloudInstanceResponse.Builder, + com.google.spanner.executor.v1.CloudInstanceResponseOrBuilder> + instanceResponseBuilder_; + /** + * + * + *
+     * Results of instance related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + * + * @return Whether the instanceResponse field is set. + */ + public boolean hasInstanceResponse() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Results of instance related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + * + * @return The instanceResponse. + */ + public com.google.spanner.executor.v1.CloudInstanceResponse getInstanceResponse() { + if (instanceResponseBuilder_ == null) { + return instanceResponse_ == null + ? com.google.spanner.executor.v1.CloudInstanceResponse.getDefaultInstance() + : instanceResponse_; + } else { + return instanceResponseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Results of instance related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + */ + public Builder setInstanceResponse(com.google.spanner.executor.v1.CloudInstanceResponse value) { + if (instanceResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceResponse_ = value; + } else { + instanceResponseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of instance related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + */ + public Builder setInstanceResponse( + com.google.spanner.executor.v1.CloudInstanceResponse.Builder builderForValue) { + if (instanceResponseBuilder_ == null) { + instanceResponse_ = builderForValue.build(); + } else { + instanceResponseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of instance related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + */ + public Builder mergeInstanceResponse( + com.google.spanner.executor.v1.CloudInstanceResponse value) { + if (instanceResponseBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && instanceResponse_ != null + && instanceResponse_ + != com.google.spanner.executor.v1.CloudInstanceResponse.getDefaultInstance()) { + getInstanceResponseBuilder().mergeFrom(value); + } else { + instanceResponse_ = value; + } + } else { + instanceResponseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of instance related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + */ + public Builder clearInstanceResponse() { + bitField0_ = (bitField0_ & ~0x00000008); + instanceResponse_ = null; + if (instanceResponseBuilder_ != null) { + instanceResponseBuilder_.dispose(); + instanceResponseBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Results of instance related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + */ + public com.google.spanner.executor.v1.CloudInstanceResponse.Builder + getInstanceResponseBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getInstanceResponseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Results of instance related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + */ + public com.google.spanner.executor.v1.CloudInstanceResponseOrBuilder + getInstanceResponseOrBuilder() { + if (instanceResponseBuilder_ != null) { + return instanceResponseBuilder_.getMessageOrBuilder(); + } else { + return instanceResponse_ == null + ? com.google.spanner.executor.v1.CloudInstanceResponse.getDefaultInstance() + : instanceResponse_; + } + } + /** + * + * + *
+     * Results of instance related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloudInstanceResponse, + com.google.spanner.executor.v1.CloudInstanceResponse.Builder, + com.google.spanner.executor.v1.CloudInstanceResponseOrBuilder> + getInstanceResponseFieldBuilder() { + if (instanceResponseBuilder_ == null) { + instanceResponseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloudInstanceResponse, + com.google.spanner.executor.v1.CloudInstanceResponse.Builder, + com.google.spanner.executor.v1.CloudInstanceResponseOrBuilder>( + getInstanceResponse(), getParentForChildren(), isClean()); + instanceResponse_ = null; + } + return instanceResponseBuilder_; + } + + private com.google.spanner.executor.v1.CloudInstanceConfigResponse instanceConfigResponse_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloudInstanceConfigResponse, + com.google.spanner.executor.v1.CloudInstanceConfigResponse.Builder, + com.google.spanner.executor.v1.CloudInstanceConfigResponseOrBuilder> + instanceConfigResponseBuilder_; + /** + * + * + *
+     * Results of instance config related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + * + * @return Whether the instanceConfigResponse field is set. + */ + public boolean hasInstanceConfigResponse() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Results of instance config related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + * + * @return The instanceConfigResponse. + */ + public com.google.spanner.executor.v1.CloudInstanceConfigResponse getInstanceConfigResponse() { + if (instanceConfigResponseBuilder_ == null) { + return instanceConfigResponse_ == null + ? com.google.spanner.executor.v1.CloudInstanceConfigResponse.getDefaultInstance() + : instanceConfigResponse_; + } else { + return instanceConfigResponseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Results of instance config related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + */ + public Builder setInstanceConfigResponse( + com.google.spanner.executor.v1.CloudInstanceConfigResponse value) { + if (instanceConfigResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceConfigResponse_ = value; + } else { + instanceConfigResponseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of instance config related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + */ + public Builder setInstanceConfigResponse( + com.google.spanner.executor.v1.CloudInstanceConfigResponse.Builder builderForValue) { + if (instanceConfigResponseBuilder_ == null) { + instanceConfigResponse_ = builderForValue.build(); + } else { + instanceConfigResponseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of instance config related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + */ + public Builder mergeInstanceConfigResponse( + com.google.spanner.executor.v1.CloudInstanceConfigResponse value) { + if (instanceConfigResponseBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && instanceConfigResponse_ != null + && instanceConfigResponse_ + != com.google.spanner.executor.v1.CloudInstanceConfigResponse + .getDefaultInstance()) { + getInstanceConfigResponseBuilder().mergeFrom(value); + } else { + instanceConfigResponse_ = value; + } + } else { + instanceConfigResponseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Results of instance config related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + */ + public Builder clearInstanceConfigResponse() { + bitField0_ = (bitField0_ & ~0x00000010); + instanceConfigResponse_ = null; + if (instanceConfigResponseBuilder_ != null) { + instanceConfigResponseBuilder_.dispose(); + instanceConfigResponseBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Results of instance config related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + */ + public com.google.spanner.executor.v1.CloudInstanceConfigResponse.Builder + getInstanceConfigResponseBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getInstanceConfigResponseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Results of instance config related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + */ + public com.google.spanner.executor.v1.CloudInstanceConfigResponseOrBuilder + getInstanceConfigResponseOrBuilder() { + if (instanceConfigResponseBuilder_ != null) { + return instanceConfigResponseBuilder_.getMessageOrBuilder(); + } else { + return instanceConfigResponse_ == null + ? com.google.spanner.executor.v1.CloudInstanceConfigResponse.getDefaultInstance() + : instanceConfigResponse_; + } + } + /** + * + * + *
+     * Results of instance config related actions.
+     * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloudInstanceConfigResponse, + com.google.spanner.executor.v1.CloudInstanceConfigResponse.Builder, + com.google.spanner.executor.v1.CloudInstanceConfigResponseOrBuilder> + getInstanceConfigResponseFieldBuilder() { + if (instanceConfigResponseBuilder_ == null) { + instanceConfigResponseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloudInstanceConfigResponse, + com.google.spanner.executor.v1.CloudInstanceConfigResponse.Builder, + com.google.spanner.executor.v1.CloudInstanceConfigResponseOrBuilder>( + getInstanceConfigResponse(), getParentForChildren(), isClean()); + instanceConfigResponse_ = null; + } + return instanceConfigResponseBuilder_; + } + + @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.executor.v1.AdminResult) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.AdminResult) + private static final com.google.spanner.executor.v1.AdminResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.AdminResult(); + } + + public static com.google.spanner.executor.v1.AdminResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdminResult 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.executor.v1.AdminResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminResultOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminResultOrBuilder.java new file mode 100644 index 00000000000..371d0bcc7b6 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/AdminResultOrBuilder.java @@ -0,0 +1,204 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface AdminResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.AdminResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Results of cloud backup related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + * + * @return Whether the backupResponse field is set. + */ + boolean hasBackupResponse(); + /** + * + * + *
+   * Results of cloud backup related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + * + * @return The backupResponse. + */ + com.google.spanner.executor.v1.CloudBackupResponse getBackupResponse(); + /** + * + * + *
+   * Results of cloud backup related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudBackupResponse backup_response = 1; + */ + com.google.spanner.executor.v1.CloudBackupResponseOrBuilder getBackupResponseOrBuilder(); + + /** + * + * + *
+   * Results of operation related actions.
+   * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + * + * @return Whether the operationResponse field is set. + */ + boolean hasOperationResponse(); + /** + * + * + *
+   * Results of operation related actions.
+   * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + * + * @return The operationResponse. + */ + com.google.spanner.executor.v1.OperationResponse getOperationResponse(); + /** + * + * + *
+   * Results of operation related actions.
+   * 
+ * + * .google.spanner.executor.v1.OperationResponse operation_response = 2; + */ + com.google.spanner.executor.v1.OperationResponseOrBuilder getOperationResponseOrBuilder(); + + /** + * + * + *
+   * Results of database related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + * + * @return Whether the databaseResponse field is set. + */ + boolean hasDatabaseResponse(); + /** + * + * + *
+   * Results of database related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + * + * @return The databaseResponse. + */ + com.google.spanner.executor.v1.CloudDatabaseResponse getDatabaseResponse(); + /** + * + * + *
+   * Results of database related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudDatabaseResponse database_response = 3; + */ + com.google.spanner.executor.v1.CloudDatabaseResponseOrBuilder getDatabaseResponseOrBuilder(); + + /** + * + * + *
+   * Results of instance related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + * + * @return Whether the instanceResponse field is set. + */ + boolean hasInstanceResponse(); + /** + * + * + *
+   * Results of instance related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + * + * @return The instanceResponse. + */ + com.google.spanner.executor.v1.CloudInstanceResponse getInstanceResponse(); + /** + * + * + *
+   * Results of instance related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudInstanceResponse instance_response = 4; + */ + com.google.spanner.executor.v1.CloudInstanceResponseOrBuilder getInstanceResponseOrBuilder(); + + /** + * + * + *
+   * Results of instance config related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + * + * @return Whether the instanceConfigResponse field is set. + */ + boolean hasInstanceConfigResponse(); + /** + * + * + *
+   * Results of instance config related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + * + * @return The instanceConfigResponse. + */ + com.google.spanner.executor.v1.CloudInstanceConfigResponse getInstanceConfigResponse(); + /** + * + * + *
+   * Results of instance config related actions.
+   * 
+ * + * .google.spanner.executor.v1.CloudInstanceConfigResponse instance_config_response = 5; + * + */ + com.google.spanner.executor.v1.CloudInstanceConfigResponseOrBuilder + getInstanceConfigResponseOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/BatchDmlAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/BatchDmlAction.java new file mode 100644 index 00000000000..e437cfe7700 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/BatchDmlAction.java @@ -0,0 +1,933 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Batch of DML statements invoked using batched execution.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.BatchDmlAction} + */ +public final class BatchDmlAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.BatchDmlAction) + BatchDmlActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDmlAction.newBuilder() to construct. + private BatchDmlAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchDmlAction() { + updates_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDmlAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_BatchDmlAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_BatchDmlAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.BatchDmlAction.class, + com.google.spanner.executor.v1.BatchDmlAction.Builder.class); + } + + public static final int UPDATES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List updates_; + /** + * + * + *
+   * DML statements.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + @java.lang.Override + public java.util.List getUpdatesList() { + return updates_; + } + /** + * + * + *
+   * DML statements.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + @java.lang.Override + public java.util.List + getUpdatesOrBuilderList() { + return updates_; + } + /** + * + * + *
+   * DML statements.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + @java.lang.Override + public int getUpdatesCount() { + return updates_.size(); + } + /** + * + * + *
+   * DML statements.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction getUpdates(int index) { + return updates_.get(index); + } + /** + * + * + *
+   * DML statements.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryActionOrBuilder getUpdatesOrBuilder(int index) { + return updates_.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 < updates_.size(); i++) { + output.writeMessage(1, updates_.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 < updates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, updates_.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.executor.v1.BatchDmlAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.BatchDmlAction other = + (com.google.spanner.executor.v1.BatchDmlAction) obj; + + if (!getUpdatesList().equals(other.getUpdatesList())) 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 (getUpdatesCount() > 0) { + hash = (37 * hash) + UPDATES_FIELD_NUMBER; + hash = (53 * hash) + getUpdatesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.BatchDmlAction parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.BatchDmlAction 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.executor.v1.BatchDmlAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.BatchDmlAction 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.executor.v1.BatchDmlAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.BatchDmlAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.BatchDmlAction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.BatchDmlAction 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.executor.v1.BatchDmlAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.BatchDmlAction 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.executor.v1.BatchDmlAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.BatchDmlAction 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.executor.v1.BatchDmlAction 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; + } + /** + * + * + *
+   * Batch of DML statements invoked using batched execution.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.BatchDmlAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.BatchDmlAction) + com.google.spanner.executor.v1.BatchDmlActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_BatchDmlAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_BatchDmlAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.BatchDmlAction.class, + com.google.spanner.executor.v1.BatchDmlAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.BatchDmlAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (updatesBuilder_ == null) { + updates_ = java.util.Collections.emptyList(); + } else { + updates_ = null; + updatesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_BatchDmlAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.BatchDmlAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.BatchDmlAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.BatchDmlAction build() { + com.google.spanner.executor.v1.BatchDmlAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.BatchDmlAction buildPartial() { + com.google.spanner.executor.v1.BatchDmlAction result = + new com.google.spanner.executor.v1.BatchDmlAction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.executor.v1.BatchDmlAction result) { + if (updatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + updates_ = java.util.Collections.unmodifiableList(updates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.updates_ = updates_; + } else { + result.updates_ = updatesBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.BatchDmlAction 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.executor.v1.BatchDmlAction) { + return mergeFrom((com.google.spanner.executor.v1.BatchDmlAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.BatchDmlAction other) { + if (other == com.google.spanner.executor.v1.BatchDmlAction.getDefaultInstance()) return this; + if (updatesBuilder_ == null) { + if (!other.updates_.isEmpty()) { + if (updates_.isEmpty()) { + updates_ = other.updates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUpdatesIsMutable(); + updates_.addAll(other.updates_); + } + onChanged(); + } + } else { + if (!other.updates_.isEmpty()) { + if (updatesBuilder_.isEmpty()) { + updatesBuilder_.dispose(); + updatesBuilder_ = null; + updates_ = other.updates_; + bitField0_ = (bitField0_ & ~0x00000001); + updatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUpdatesFieldBuilder() + : null; + } else { + updatesBuilder_.addAllMessages(other.updates_); + } + } + } + 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.executor.v1.QueryAction m = + input.readMessage( + com.google.spanner.executor.v1.QueryAction.parser(), extensionRegistry); + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.add(m); + } else { + updatesBuilder_.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 updates_ = + java.util.Collections.emptyList(); + + private void ensureUpdatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + updates_ = new java.util.ArrayList(updates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder> + updatesBuilder_; + + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public java.util.List getUpdatesList() { + if (updatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(updates_); + } else { + return updatesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public int getUpdatesCount() { + if (updatesBuilder_ == null) { + return updates_.size(); + } else { + return updatesBuilder_.getCount(); + } + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public com.google.spanner.executor.v1.QueryAction getUpdates(int index) { + if (updatesBuilder_ == null) { + return updates_.get(index); + } else { + return updatesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public Builder setUpdates(int index, com.google.spanner.executor.v1.QueryAction value) { + if (updatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatesIsMutable(); + updates_.set(index, value); + onChanged(); + } else { + updatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public Builder setUpdates( + int index, com.google.spanner.executor.v1.QueryAction.Builder builderForValue) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.set(index, builderForValue.build()); + onChanged(); + } else { + updatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public Builder addUpdates(com.google.spanner.executor.v1.QueryAction value) { + if (updatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatesIsMutable(); + updates_.add(value); + onChanged(); + } else { + updatesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public Builder addUpdates(int index, com.google.spanner.executor.v1.QueryAction value) { + if (updatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatesIsMutable(); + updates_.add(index, value); + onChanged(); + } else { + updatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public Builder addUpdates(com.google.spanner.executor.v1.QueryAction.Builder builderForValue) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.add(builderForValue.build()); + onChanged(); + } else { + updatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public Builder addUpdates( + int index, com.google.spanner.executor.v1.QueryAction.Builder builderForValue) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.add(index, builderForValue.build()); + onChanged(); + } else { + updatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public Builder addAllUpdates( + java.lang.Iterable values) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, updates_); + onChanged(); + } else { + updatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public Builder clearUpdates() { + if (updatesBuilder_ == null) { + updates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + updatesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public Builder removeUpdates(int index) { + if (updatesBuilder_ == null) { + ensureUpdatesIsMutable(); + updates_.remove(index); + onChanged(); + } else { + updatesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public com.google.spanner.executor.v1.QueryAction.Builder getUpdatesBuilder(int index) { + return getUpdatesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public com.google.spanner.executor.v1.QueryActionOrBuilder getUpdatesOrBuilder(int index) { + if (updatesBuilder_ == null) { + return updates_.get(index); + } else { + return updatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public java.util.List + getUpdatesOrBuilderList() { + if (updatesBuilder_ != null) { + return updatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(updates_); + } + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public com.google.spanner.executor.v1.QueryAction.Builder addUpdatesBuilder() { + return getUpdatesFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.QueryAction.getDefaultInstance()); + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public com.google.spanner.executor.v1.QueryAction.Builder addUpdatesBuilder(int index) { + return getUpdatesFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.QueryAction.getDefaultInstance()); + } + /** + * + * + *
+     * DML statements.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + public java.util.List + getUpdatesBuilderList() { + return getUpdatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder> + getUpdatesFieldBuilder() { + if (updatesBuilder_ == null) { + updatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder>( + updates_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + updates_ = null; + } + return updatesBuilder_; + } + + @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.executor.v1.BatchDmlAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.BatchDmlAction) + private static final com.google.spanner.executor.v1.BatchDmlAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.BatchDmlAction(); + } + + public static com.google.spanner.executor.v1.BatchDmlAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDmlAction 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.executor.v1.BatchDmlAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/BatchDmlActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/BatchDmlActionOrBuilder.java new file mode 100644 index 00000000000..498f7f0098d --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/BatchDmlActionOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface BatchDmlActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.BatchDmlAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * DML statements.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + java.util.List getUpdatesList(); + /** + * + * + *
+   * DML statements.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + com.google.spanner.executor.v1.QueryAction getUpdates(int index); + /** + * + * + *
+   * DML statements.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + int getUpdatesCount(); + /** + * + * + *
+   * DML statements.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + java.util.List + getUpdatesOrBuilderList(); + /** + * + * + *
+   * DML statements.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction updates = 1; + */ + com.google.spanner.executor.v1.QueryActionOrBuilder getUpdatesOrBuilder(int index); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/BatchPartition.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/BatchPartition.java new file mode 100644 index 00000000000..ea5c14f7415 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/BatchPartition.java @@ -0,0 +1,1081 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Identifies a database partition generated for a particular read or query. To
+ * read rows from the partition, use ExecutePartitionAction.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.BatchPartition} + */ +public final class BatchPartition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.BatchPartition) + BatchPartitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchPartition.newBuilder() to construct. + private BatchPartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchPartition() { + partition_ = com.google.protobuf.ByteString.EMPTY; + partitionToken_ = com.google.protobuf.ByteString.EMPTY; + table_ = ""; + index_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchPartition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_BatchPartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_BatchPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.BatchPartition.class, + com.google.spanner.executor.v1.BatchPartition.Builder.class); + } + + private int bitField0_; + public static final int PARTITION_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString partition_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+   * Serialized Partition instance.
+   * 
+ * + * bytes partition = 1; + * + * @return The partition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPartition() { + return partition_; + } + + public static final int PARTITION_TOKEN_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString partitionToken_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+   * The partition token decrypted from partition.
+   * 
+ * + * bytes partition_token = 2; + * + * @return The partitionToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPartitionToken() { + return partitionToken_; + } + + public static final int TABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object table_ = ""; + /** + * + * + *
+   * Table name is set iff the partition was generated for a read (as opposed to
+   * a query).
+   * 
+ * + * optional string table = 3; + * + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Table name is set iff the partition was generated for a read (as opposed to
+   * a query).
+   * 
+ * + * optional string table = 3; + * + * @return The table. + */ + @java.lang.Override + public java.lang.String getTable() { + java.lang.Object ref = table_; + 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(); + table_ = s; + return s; + } + } + /** + * + * + *
+   * Table name is set iff the partition was generated for a read (as opposed to
+   * a query).
+   * 
+ * + * optional string table = 3; + * + * @return The bytes for table. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object index_ = ""; + /** + * + * + *
+   * Index name if the partition was generated for an index read.
+   * 
+ * + * optional string index = 4; + * + * @return Whether the index field is set. + */ + @java.lang.Override + public boolean hasIndex() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Index name if the partition was generated for an index read.
+   * 
+ * + * optional string index = 4; + * + * @return The index. + */ + @java.lang.Override + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * Index name if the partition was generated for an index read.
+   * 
+ * + * optional string index = 4; + * + * @return The bytes for index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!partition_.isEmpty()) { + output.writeBytes(1, partition_); + } + if (!partitionToken_.isEmpty()) { + output.writeBytes(2, partitionToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, table_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, index_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!partition_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, partition_); + } + if (!partitionToken_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, partitionToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, table_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, index_); + } + 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.executor.v1.BatchPartition)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.BatchPartition other = + (com.google.spanner.executor.v1.BatchPartition) obj; + + if (!getPartition().equals(other.getPartition())) return false; + if (!getPartitionToken().equals(other.getPartitionToken())) return false; + if (hasTable() != other.hasTable()) return false; + if (hasTable()) { + if (!getTable().equals(other.getTable())) return false; + } + if (hasIndex() != other.hasIndex()) return false; + if (hasIndex()) { + if (!getIndex().equals(other.getIndex())) 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) + PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getPartition().hashCode(); + hash = (37 * hash) + PARTITION_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPartitionToken().hashCode(); + if (hasTable()) { + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + } + if (hasIndex()) { + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.BatchPartition parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.BatchPartition 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.executor.v1.BatchPartition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.BatchPartition 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.executor.v1.BatchPartition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.BatchPartition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.BatchPartition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.BatchPartition 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.executor.v1.BatchPartition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.BatchPartition 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.executor.v1.BatchPartition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.BatchPartition 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.executor.v1.BatchPartition 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; + } + /** + * + * + *
+   * Identifies a database partition generated for a particular read or query. To
+   * read rows from the partition, use ExecutePartitionAction.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.BatchPartition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.BatchPartition) + com.google.spanner.executor.v1.BatchPartitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_BatchPartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_BatchPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.BatchPartition.class, + com.google.spanner.executor.v1.BatchPartition.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.BatchPartition.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partition_ = com.google.protobuf.ByteString.EMPTY; + partitionToken_ = com.google.protobuf.ByteString.EMPTY; + table_ = ""; + index_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_BatchPartition_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.BatchPartition getDefaultInstanceForType() { + return com.google.spanner.executor.v1.BatchPartition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.BatchPartition build() { + com.google.spanner.executor.v1.BatchPartition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.BatchPartition buildPartial() { + com.google.spanner.executor.v1.BatchPartition result = + new com.google.spanner.executor.v1.BatchPartition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.BatchPartition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partition_ = partition_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.partitionToken_ = partitionToken_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.table_ = table_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.index_ = index_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_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.executor.v1.BatchPartition) { + return mergeFrom((com.google.spanner.executor.v1.BatchPartition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.BatchPartition other) { + if (other == com.google.spanner.executor.v1.BatchPartition.getDefaultInstance()) return this; + if (other.getPartition() != com.google.protobuf.ByteString.EMPTY) { + setPartition(other.getPartition()); + } + if (other.getPartitionToken() != com.google.protobuf.ByteString.EMPTY) { + setPartitionToken(other.getPartitionToken()); + } + if (other.hasTable()) { + table_ = other.table_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasIndex()) { + index_ = other.index_; + bitField0_ |= 0x00000008; + onChanged(); + } + 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: + { + partition_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + partitionToken_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + table_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + index_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + 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 com.google.protobuf.ByteString partition_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * Serialized Partition instance.
+     * 
+ * + * bytes partition = 1; + * + * @return The partition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPartition() { + return partition_; + } + /** + * + * + *
+     * Serialized Partition instance.
+     * 
+ * + * bytes partition = 1; + * + * @param value The partition to set. + * @return This builder for chaining. + */ + public Builder setPartition(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + partition_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Serialized Partition instance.
+     * 
+ * + * bytes partition = 1; + * + * @return This builder for chaining. + */ + public Builder clearPartition() { + bitField0_ = (bitField0_ & ~0x00000001); + partition_ = getDefaultInstance().getPartition(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString partitionToken_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * The partition token decrypted from partition.
+     * 
+ * + * bytes partition_token = 2; + * + * @return The partitionToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPartitionToken() { + return partitionToken_; + } + /** + * + * + *
+     * The partition token decrypted from partition.
+     * 
+ * + * bytes partition_token = 2; + * + * @param value The partitionToken to set. + * @return This builder for chaining. + */ + public Builder setPartitionToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + partitionToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The partition token decrypted from partition.
+     * 
+ * + * bytes partition_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearPartitionToken() { + bitField0_ = (bitField0_ & ~0x00000002); + partitionToken_ = getDefaultInstance().getPartitionToken(); + onChanged(); + return this; + } + + private java.lang.Object table_ = ""; + /** + * + * + *
+     * Table name is set iff the partition was generated for a read (as opposed to
+     * a query).
+     * 
+ * + * optional string table = 3; + * + * @return Whether the table field is set. + */ + public boolean hasTable() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Table name is set iff the partition was generated for a read (as opposed to
+     * a query).
+     * 
+ * + * optional string table = 3; + * + * @return The table. + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Table name is set iff the partition was generated for a read (as opposed to
+     * a query).
+     * 
+ * + * optional string table = 3; + * + * @return The bytes for table. + */ + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Table name is set iff the partition was generated for a read (as opposed to
+     * a query).
+     * 
+ * + * optional string table = 3; + * + * @param value The table to set. + * @return This builder for chaining. + */ + public Builder setTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Table name is set iff the partition was generated for a read (as opposed to
+     * a query).
+     * 
+ * + * optional string table = 3; + * + * @return This builder for chaining. + */ + public Builder clearTable() { + table_ = getDefaultInstance().getTable(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Table name is set iff the partition was generated for a read (as opposed to
+     * a query).
+     * 
+ * + * optional string table = 3; + * + * @param value The bytes for table to set. + * @return This builder for chaining. + */ + public Builder setTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + table_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * Index name if the partition was generated for an index read.
+     * 
+ * + * optional string index = 4; + * + * @return Whether the index field is set. + */ + public boolean hasIndex() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Index name if the partition was generated for an index read.
+     * 
+ * + * optional string index = 4; + * + * @return The index. + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Index name if the partition was generated for an index read.
+     * 
+ * + * optional string index = 4; + * + * @return The bytes for index. + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Index name if the partition was generated for an index read.
+     * 
+ * + * optional string index = 4; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + index_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Index name if the partition was generated for an index read.
+     * 
+ * + * optional string index = 4; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + index_ = getDefaultInstance().getIndex(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Index name if the partition was generated for an index read.
+     * 
+ * + * optional string index = 4; + * + * @param value The bytes for index to set. + * @return This builder for chaining. + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + index_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.BatchPartition) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.BatchPartition) + private static final com.google.spanner.executor.v1.BatchPartition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.BatchPartition(); + } + + public static com.google.spanner.executor.v1.BatchPartition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchPartition 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.executor.v1.BatchPartition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/BatchPartitionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/BatchPartitionOrBuilder.java new file mode 100644 index 00000000000..73ebc822f2e --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/BatchPartitionOrBuilder.java @@ -0,0 +1,128 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface BatchPartitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.BatchPartition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Serialized Partition instance.
+   * 
+ * + * bytes partition = 1; + * + * @return The partition. + */ + com.google.protobuf.ByteString getPartition(); + + /** + * + * + *
+   * The partition token decrypted from partition.
+   * 
+ * + * bytes partition_token = 2; + * + * @return The partitionToken. + */ + com.google.protobuf.ByteString getPartitionToken(); + + /** + * + * + *
+   * Table name is set iff the partition was generated for a read (as opposed to
+   * a query).
+   * 
+ * + * optional string table = 3; + * + * @return Whether the table field is set. + */ + boolean hasTable(); + /** + * + * + *
+   * Table name is set iff the partition was generated for a read (as opposed to
+   * a query).
+   * 
+ * + * optional string table = 3; + * + * @return The table. + */ + java.lang.String getTable(); + /** + * + * + *
+   * Table name is set iff the partition was generated for a read (as opposed to
+   * a query).
+   * 
+ * + * optional string table = 3; + * + * @return The bytes for table. + */ + com.google.protobuf.ByteString getTableBytes(); + + /** + * + * + *
+   * Index name if the partition was generated for an index read.
+   * 
+ * + * optional string index = 4; + * + * @return Whether the index field is set. + */ + boolean hasIndex(); + /** + * + * + *
+   * Index name if the partition was generated for an index read.
+   * 
+ * + * optional string index = 4; + * + * @return The index. + */ + java.lang.String getIndex(); + /** + * + * + *
+   * Index name if the partition was generated for an index read.
+   * 
+ * + * optional string index = 4; + * + * @return The bytes for index. + */ + com.google.protobuf.ByteString getIndexBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CancelOperationAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CancelOperationAction.java new file mode 100644 index 00000000000..1338d97cb87 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CancelOperationAction.java @@ -0,0 +1,624 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that cancels an operation.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CancelOperationAction} + */ +public final class CancelOperationAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CancelOperationAction) + CancelOperationActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelOperationAction.newBuilder() to construct. + private CancelOperationAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelOperationAction() { + operation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelOperationAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CancelOperationAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CancelOperationAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CancelOperationAction.class, + com.google.spanner.executor.v1.CancelOperationAction.Builder.class); + } + + public static final int OPERATION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object operation_ = ""; + /** + * + * + *
+   * The name of the operation resource to be cancelled.
+   * 
+ * + * string operation = 1; + * + * @return The operation. + */ + @java.lang.Override + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + 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(); + operation_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the operation resource to be cancelled.
+   * 
+ * + * string operation = 1; + * + * @return The bytes for operation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(operation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, operation_); + } + 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(operation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operation_); + } + 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.executor.v1.CancelOperationAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.CancelOperationAction other = + (com.google.spanner.executor.v1.CancelOperationAction) obj; + + if (!getOperation().equals(other.getOperation())) 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) + OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getOperation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.CancelOperationAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CancelOperationAction 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.executor.v1.CancelOperationAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CancelOperationAction 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.executor.v1.CancelOperationAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CancelOperationAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.CancelOperationAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CancelOperationAction 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.executor.v1.CancelOperationAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CancelOperationAction 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.executor.v1.CancelOperationAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CancelOperationAction 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.executor.v1.CancelOperationAction 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; + } + /** + * + * + *
+   * Action that cancels an operation.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CancelOperationAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CancelOperationAction) + com.google.spanner.executor.v1.CancelOperationActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CancelOperationAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CancelOperationAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CancelOperationAction.class, + com.google.spanner.executor.v1.CancelOperationAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.CancelOperationAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CancelOperationAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CancelOperationAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.CancelOperationAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.CancelOperationAction build() { + com.google.spanner.executor.v1.CancelOperationAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CancelOperationAction buildPartial() { + com.google.spanner.executor.v1.CancelOperationAction result = + new com.google.spanner.executor.v1.CancelOperationAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.CancelOperationAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operation_ = operation_; + } + } + + @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.executor.v1.CancelOperationAction) { + return mergeFrom((com.google.spanner.executor.v1.CancelOperationAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.CancelOperationAction other) { + if (other == com.google.spanner.executor.v1.CancelOperationAction.getDefaultInstance()) + return this; + if (!other.getOperation().isEmpty()) { + operation_ = other.operation_; + bitField0_ |= 0x00000001; + onChanged(); + } + 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: + { + operation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + 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.lang.Object operation_ = ""; + /** + * + * + *
+     * The name of the operation resource to be cancelled.
+     * 
+ * + * string operation = 1; + * + * @return The operation. + */ + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the operation resource to be cancelled.
+     * 
+ * + * string operation = 1; + * + * @return The bytes for operation. + */ + public com.google.protobuf.ByteString getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the operation resource to be cancelled.
+     * 
+ * + * string operation = 1; + * + * @param value The operation to set. + * @return This builder for chaining. + */ + public Builder setOperation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + operation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the operation resource to be cancelled.
+     * 
+ * + * string operation = 1; + * + * @return This builder for chaining. + */ + public Builder clearOperation() { + operation_ = getDefaultInstance().getOperation(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the operation resource to be cancelled.
+     * 
+ * + * string operation = 1; + * + * @param value The bytes for operation to set. + * @return This builder for chaining. + */ + public Builder setOperationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + operation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.CancelOperationAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.CancelOperationAction) + private static final com.google.spanner.executor.v1.CancelOperationAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.CancelOperationAction(); + } + + public static com.google.spanner.executor.v1.CancelOperationAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelOperationAction 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.executor.v1.CancelOperationAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CancelOperationActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CancelOperationActionOrBuilder.java new file mode 100644 index 00000000000..37ca9213375 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CancelOperationActionOrBuilder.java @@ -0,0 +1,50 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface CancelOperationActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CancelOperationAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the operation resource to be cancelled.
+   * 
+ * + * string operation = 1; + * + * @return The operation. + */ + java.lang.String getOperation(); + /** + * + * + *
+   * The name of the operation resource to be cancelled.
+   * 
+ * + * string operation = 1; + * + * @return The bytes for operation. + */ + com.google.protobuf.ByteString getOperationBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeStreamRecord.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeStreamRecord.java new file mode 100644 index 00000000000..4dc95858445 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeStreamRecord.java @@ -0,0 +1,1413 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Raw ChangeStream records.
+ * Encodes one of: DataChangeRecord, HeartbeatRecord, ChildPartitionsRecord
+ * returned from the ChangeStream API.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ChangeStreamRecord} + */ +public final class ChangeStreamRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ChangeStreamRecord) + ChangeStreamRecordOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChangeStreamRecord.newBuilder() to construct. + private ChangeStreamRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChangeStreamRecord() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChangeStreamRecord(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChangeStreamRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChangeStreamRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ChangeStreamRecord.class, + com.google.spanner.executor.v1.ChangeStreamRecord.Builder.class); + } + + private int recordCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object record_; + + public enum RecordCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATA_CHANGE(1), + CHILD_PARTITION(2), + HEARTBEAT(3), + RECORD_NOT_SET(0); + private final int value; + + private RecordCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RecordCase valueOf(int value) { + return forNumber(value); + } + + public static RecordCase forNumber(int value) { + switch (value) { + case 1: + return DATA_CHANGE; + case 2: + return CHILD_PARTITION; + case 3: + return HEARTBEAT; + case 0: + return RECORD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RecordCase getRecordCase() { + return RecordCase.forNumber(recordCase_); + } + + public static final int DATA_CHANGE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Data change record.
+   * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + * + * @return Whether the dataChange field is set. + */ + @java.lang.Override + public boolean hasDataChange() { + return recordCase_ == 1; + } + /** + * + * + *
+   * Data change record.
+   * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + * + * @return The dataChange. + */ + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord getDataChange() { + if (recordCase_ == 1) { + return (com.google.spanner.executor.v1.DataChangeRecord) record_; + } + return com.google.spanner.executor.v1.DataChangeRecord.getDefaultInstance(); + } + /** + * + * + *
+   * Data change record.
+   * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecordOrBuilder getDataChangeOrBuilder() { + if (recordCase_ == 1) { + return (com.google.spanner.executor.v1.DataChangeRecord) record_; + } + return com.google.spanner.executor.v1.DataChangeRecord.getDefaultInstance(); + } + + public static final int CHILD_PARTITION_FIELD_NUMBER = 2; + /** + * + * + *
+   * Child partitions record.
+   * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + * + * @return Whether the childPartition field is set. + */ + @java.lang.Override + public boolean hasChildPartition() { + return recordCase_ == 2; + } + /** + * + * + *
+   * Child partitions record.
+   * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + * + * @return The childPartition. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ChildPartitionsRecord getChildPartition() { + if (recordCase_ == 2) { + return (com.google.spanner.executor.v1.ChildPartitionsRecord) record_; + } + return com.google.spanner.executor.v1.ChildPartitionsRecord.getDefaultInstance(); + } + /** + * + * + *
+   * Child partitions record.
+   * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ChildPartitionsRecordOrBuilder + getChildPartitionOrBuilder() { + if (recordCase_ == 2) { + return (com.google.spanner.executor.v1.ChildPartitionsRecord) record_; + } + return com.google.spanner.executor.v1.ChildPartitionsRecord.getDefaultInstance(); + } + + public static final int HEARTBEAT_FIELD_NUMBER = 3; + /** + * + * + *
+   * Heartbeat record.
+   * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + * + * @return Whether the heartbeat field is set. + */ + @java.lang.Override + public boolean hasHeartbeat() { + return recordCase_ == 3; + } + /** + * + * + *
+   * Heartbeat record.
+   * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + * + * @return The heartbeat. + */ + @java.lang.Override + public com.google.spanner.executor.v1.HeartbeatRecord getHeartbeat() { + if (recordCase_ == 3) { + return (com.google.spanner.executor.v1.HeartbeatRecord) record_; + } + return com.google.spanner.executor.v1.HeartbeatRecord.getDefaultInstance(); + } + /** + * + * + *
+   * Heartbeat record.
+   * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + */ + @java.lang.Override + public com.google.spanner.executor.v1.HeartbeatRecordOrBuilder getHeartbeatOrBuilder() { + if (recordCase_ == 3) { + return (com.google.spanner.executor.v1.HeartbeatRecord) record_; + } + return com.google.spanner.executor.v1.HeartbeatRecord.getDefaultInstance(); + } + + 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 (recordCase_ == 1) { + output.writeMessage(1, (com.google.spanner.executor.v1.DataChangeRecord) record_); + } + if (recordCase_ == 2) { + output.writeMessage(2, (com.google.spanner.executor.v1.ChildPartitionsRecord) record_); + } + if (recordCase_ == 3) { + output.writeMessage(3, (com.google.spanner.executor.v1.HeartbeatRecord) record_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (recordCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.spanner.executor.v1.DataChangeRecord) record_); + } + if (recordCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.spanner.executor.v1.ChildPartitionsRecord) record_); + } + if (recordCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.spanner.executor.v1.HeartbeatRecord) record_); + } + 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.executor.v1.ChangeStreamRecord)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ChangeStreamRecord other = + (com.google.spanner.executor.v1.ChangeStreamRecord) obj; + + if (!getRecordCase().equals(other.getRecordCase())) return false; + switch (recordCase_) { + case 1: + if (!getDataChange().equals(other.getDataChange())) return false; + break; + case 2: + if (!getChildPartition().equals(other.getChildPartition())) return false; + break; + case 3: + if (!getHeartbeat().equals(other.getHeartbeat())) return false; + break; + case 0: + default: + } + 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(); + switch (recordCase_) { + case 1: + hash = (37 * hash) + DATA_CHANGE_FIELD_NUMBER; + hash = (53 * hash) + getDataChange().hashCode(); + break; + case 2: + hash = (37 * hash) + CHILD_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getChildPartition().hashCode(); + break; + case 3: + hash = (37 * hash) + HEARTBEAT_FIELD_NUMBER; + hash = (53 * hash) + getHeartbeat().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ChangeStreamRecord parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ChangeStreamRecord 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.executor.v1.ChangeStreamRecord parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ChangeStreamRecord 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.executor.v1.ChangeStreamRecord parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ChangeStreamRecord parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ChangeStreamRecord parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ChangeStreamRecord 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.executor.v1.ChangeStreamRecord parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ChangeStreamRecord 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.executor.v1.ChangeStreamRecord parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ChangeStreamRecord 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.executor.v1.ChangeStreamRecord 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; + } + /** + * + * + *
+   * Raw ChangeStream records.
+   * Encodes one of: DataChangeRecord, HeartbeatRecord, ChildPartitionsRecord
+   * returned from the ChangeStream API.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ChangeStreamRecord} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ChangeStreamRecord) + com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChangeStreamRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChangeStreamRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ChangeStreamRecord.class, + com.google.spanner.executor.v1.ChangeStreamRecord.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ChangeStreamRecord.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataChangeBuilder_ != null) { + dataChangeBuilder_.clear(); + } + if (childPartitionBuilder_ != null) { + childPartitionBuilder_.clear(); + } + if (heartbeatBuilder_ != null) { + heartbeatBuilder_.clear(); + } + recordCase_ = 0; + record_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChangeStreamRecord_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ChangeStreamRecord getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ChangeStreamRecord.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ChangeStreamRecord build() { + com.google.spanner.executor.v1.ChangeStreamRecord result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ChangeStreamRecord buildPartial() { + com.google.spanner.executor.v1.ChangeStreamRecord result = + new com.google.spanner.executor.v1.ChangeStreamRecord(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.ChangeStreamRecord result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.spanner.executor.v1.ChangeStreamRecord result) { + result.recordCase_ = recordCase_; + result.record_ = this.record_; + if (recordCase_ == 1 && dataChangeBuilder_ != null) { + result.record_ = dataChangeBuilder_.build(); + } + if (recordCase_ == 2 && childPartitionBuilder_ != null) { + result.record_ = childPartitionBuilder_.build(); + } + if (recordCase_ == 3 && heartbeatBuilder_ != null) { + result.record_ = heartbeatBuilder_.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.executor.v1.ChangeStreamRecord) { + return mergeFrom((com.google.spanner.executor.v1.ChangeStreamRecord) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ChangeStreamRecord other) { + if (other == com.google.spanner.executor.v1.ChangeStreamRecord.getDefaultInstance()) + return this; + switch (other.getRecordCase()) { + case DATA_CHANGE: + { + mergeDataChange(other.getDataChange()); + break; + } + case CHILD_PARTITION: + { + mergeChildPartition(other.getChildPartition()); + break; + } + case HEARTBEAT: + { + mergeHeartbeat(other.getHeartbeat()); + break; + } + case RECORD_NOT_SET: + { + break; + } + } + 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: + { + input.readMessage(getDataChangeFieldBuilder().getBuilder(), extensionRegistry); + recordCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getChildPartitionFieldBuilder().getBuilder(), extensionRegistry); + recordCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getHeartbeatFieldBuilder().getBuilder(), extensionRegistry); + recordCase_ = 3; + 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 recordCase_ = 0; + private java.lang.Object record_; + + public RecordCase getRecordCase() { + return RecordCase.forNumber(recordCase_); + } + + public Builder clearRecord() { + recordCase_ = 0; + record_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DataChangeRecord, + com.google.spanner.executor.v1.DataChangeRecord.Builder, + com.google.spanner.executor.v1.DataChangeRecordOrBuilder> + dataChangeBuilder_; + /** + * + * + *
+     * Data change record.
+     * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + * + * @return Whether the dataChange field is set. + */ + @java.lang.Override + public boolean hasDataChange() { + return recordCase_ == 1; + } + /** + * + * + *
+     * Data change record.
+     * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + * + * @return The dataChange. + */ + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord getDataChange() { + if (dataChangeBuilder_ == null) { + if (recordCase_ == 1) { + return (com.google.spanner.executor.v1.DataChangeRecord) record_; + } + return com.google.spanner.executor.v1.DataChangeRecord.getDefaultInstance(); + } else { + if (recordCase_ == 1) { + return dataChangeBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.DataChangeRecord.getDefaultInstance(); + } + } + /** + * + * + *
+     * Data change record.
+     * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + */ + public Builder setDataChange(com.google.spanner.executor.v1.DataChangeRecord value) { + if (dataChangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + record_ = value; + onChanged(); + } else { + dataChangeBuilder_.setMessage(value); + } + recordCase_ = 1; + return this; + } + /** + * + * + *
+     * Data change record.
+     * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + */ + public Builder setDataChange( + com.google.spanner.executor.v1.DataChangeRecord.Builder builderForValue) { + if (dataChangeBuilder_ == null) { + record_ = builderForValue.build(); + onChanged(); + } else { + dataChangeBuilder_.setMessage(builderForValue.build()); + } + recordCase_ = 1; + return this; + } + /** + * + * + *
+     * Data change record.
+     * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + */ + public Builder mergeDataChange(com.google.spanner.executor.v1.DataChangeRecord value) { + if (dataChangeBuilder_ == null) { + if (recordCase_ == 1 + && record_ != com.google.spanner.executor.v1.DataChangeRecord.getDefaultInstance()) { + record_ = + com.google.spanner.executor.v1.DataChangeRecord.newBuilder( + (com.google.spanner.executor.v1.DataChangeRecord) record_) + .mergeFrom(value) + .buildPartial(); + } else { + record_ = value; + } + onChanged(); + } else { + if (recordCase_ == 1) { + dataChangeBuilder_.mergeFrom(value); + } else { + dataChangeBuilder_.setMessage(value); + } + } + recordCase_ = 1; + return this; + } + /** + * + * + *
+     * Data change record.
+     * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + */ + public Builder clearDataChange() { + if (dataChangeBuilder_ == null) { + if (recordCase_ == 1) { + recordCase_ = 0; + record_ = null; + onChanged(); + } + } else { + if (recordCase_ == 1) { + recordCase_ = 0; + record_ = null; + } + dataChangeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Data change record.
+     * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + */ + public com.google.spanner.executor.v1.DataChangeRecord.Builder getDataChangeBuilder() { + return getDataChangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Data change record.
+     * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecordOrBuilder getDataChangeOrBuilder() { + if ((recordCase_ == 1) && (dataChangeBuilder_ != null)) { + return dataChangeBuilder_.getMessageOrBuilder(); + } else { + if (recordCase_ == 1) { + return (com.google.spanner.executor.v1.DataChangeRecord) record_; + } + return com.google.spanner.executor.v1.DataChangeRecord.getDefaultInstance(); + } + } + /** + * + * + *
+     * Data change record.
+     * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DataChangeRecord, + com.google.spanner.executor.v1.DataChangeRecord.Builder, + com.google.spanner.executor.v1.DataChangeRecordOrBuilder> + getDataChangeFieldBuilder() { + if (dataChangeBuilder_ == null) { + if (!(recordCase_ == 1)) { + record_ = com.google.spanner.executor.v1.DataChangeRecord.getDefaultInstance(); + } + dataChangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DataChangeRecord, + com.google.spanner.executor.v1.DataChangeRecord.Builder, + com.google.spanner.executor.v1.DataChangeRecordOrBuilder>( + (com.google.spanner.executor.v1.DataChangeRecord) record_, + getParentForChildren(), + isClean()); + record_ = null; + } + recordCase_ = 1; + onChanged(); + return dataChangeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ChildPartitionsRecord, + com.google.spanner.executor.v1.ChildPartitionsRecord.Builder, + com.google.spanner.executor.v1.ChildPartitionsRecordOrBuilder> + childPartitionBuilder_; + /** + * + * + *
+     * Child partitions record.
+     * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + * + * @return Whether the childPartition field is set. + */ + @java.lang.Override + public boolean hasChildPartition() { + return recordCase_ == 2; + } + /** + * + * + *
+     * Child partitions record.
+     * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + * + * @return The childPartition. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ChildPartitionsRecord getChildPartition() { + if (childPartitionBuilder_ == null) { + if (recordCase_ == 2) { + return (com.google.spanner.executor.v1.ChildPartitionsRecord) record_; + } + return com.google.spanner.executor.v1.ChildPartitionsRecord.getDefaultInstance(); + } else { + if (recordCase_ == 2) { + return childPartitionBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ChildPartitionsRecord.getDefaultInstance(); + } + } + /** + * + * + *
+     * Child partitions record.
+     * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + */ + public Builder setChildPartition(com.google.spanner.executor.v1.ChildPartitionsRecord value) { + if (childPartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + record_ = value; + onChanged(); + } else { + childPartitionBuilder_.setMessage(value); + } + recordCase_ = 2; + return this; + } + /** + * + * + *
+     * Child partitions record.
+     * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + */ + public Builder setChildPartition( + com.google.spanner.executor.v1.ChildPartitionsRecord.Builder builderForValue) { + if (childPartitionBuilder_ == null) { + record_ = builderForValue.build(); + onChanged(); + } else { + childPartitionBuilder_.setMessage(builderForValue.build()); + } + recordCase_ = 2; + return this; + } + /** + * + * + *
+     * Child partitions record.
+     * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + */ + public Builder mergeChildPartition(com.google.spanner.executor.v1.ChildPartitionsRecord value) { + if (childPartitionBuilder_ == null) { + if (recordCase_ == 2 + && record_ + != com.google.spanner.executor.v1.ChildPartitionsRecord.getDefaultInstance()) { + record_ = + com.google.spanner.executor.v1.ChildPartitionsRecord.newBuilder( + (com.google.spanner.executor.v1.ChildPartitionsRecord) record_) + .mergeFrom(value) + .buildPartial(); + } else { + record_ = value; + } + onChanged(); + } else { + if (recordCase_ == 2) { + childPartitionBuilder_.mergeFrom(value); + } else { + childPartitionBuilder_.setMessage(value); + } + } + recordCase_ = 2; + return this; + } + /** + * + * + *
+     * Child partitions record.
+     * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + */ + public Builder clearChildPartition() { + if (childPartitionBuilder_ == null) { + if (recordCase_ == 2) { + recordCase_ = 0; + record_ = null; + onChanged(); + } + } else { + if (recordCase_ == 2) { + recordCase_ = 0; + record_ = null; + } + childPartitionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Child partitions record.
+     * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + */ + public com.google.spanner.executor.v1.ChildPartitionsRecord.Builder getChildPartitionBuilder() { + return getChildPartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Child partitions record.
+     * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ChildPartitionsRecordOrBuilder + getChildPartitionOrBuilder() { + if ((recordCase_ == 2) && (childPartitionBuilder_ != null)) { + return childPartitionBuilder_.getMessageOrBuilder(); + } else { + if (recordCase_ == 2) { + return (com.google.spanner.executor.v1.ChildPartitionsRecord) record_; + } + return com.google.spanner.executor.v1.ChildPartitionsRecord.getDefaultInstance(); + } + } + /** + * + * + *
+     * Child partitions record.
+     * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ChildPartitionsRecord, + com.google.spanner.executor.v1.ChildPartitionsRecord.Builder, + com.google.spanner.executor.v1.ChildPartitionsRecordOrBuilder> + getChildPartitionFieldBuilder() { + if (childPartitionBuilder_ == null) { + if (!(recordCase_ == 2)) { + record_ = com.google.spanner.executor.v1.ChildPartitionsRecord.getDefaultInstance(); + } + childPartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ChildPartitionsRecord, + com.google.spanner.executor.v1.ChildPartitionsRecord.Builder, + com.google.spanner.executor.v1.ChildPartitionsRecordOrBuilder>( + (com.google.spanner.executor.v1.ChildPartitionsRecord) record_, + getParentForChildren(), + isClean()); + record_ = null; + } + recordCase_ = 2; + onChanged(); + return childPartitionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.HeartbeatRecord, + com.google.spanner.executor.v1.HeartbeatRecord.Builder, + com.google.spanner.executor.v1.HeartbeatRecordOrBuilder> + heartbeatBuilder_; + /** + * + * + *
+     * Heartbeat record.
+     * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + * + * @return Whether the heartbeat field is set. + */ + @java.lang.Override + public boolean hasHeartbeat() { + return recordCase_ == 3; + } + /** + * + * + *
+     * Heartbeat record.
+     * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + * + * @return The heartbeat. + */ + @java.lang.Override + public com.google.spanner.executor.v1.HeartbeatRecord getHeartbeat() { + if (heartbeatBuilder_ == null) { + if (recordCase_ == 3) { + return (com.google.spanner.executor.v1.HeartbeatRecord) record_; + } + return com.google.spanner.executor.v1.HeartbeatRecord.getDefaultInstance(); + } else { + if (recordCase_ == 3) { + return heartbeatBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.HeartbeatRecord.getDefaultInstance(); + } + } + /** + * + * + *
+     * Heartbeat record.
+     * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + */ + public Builder setHeartbeat(com.google.spanner.executor.v1.HeartbeatRecord value) { + if (heartbeatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + record_ = value; + onChanged(); + } else { + heartbeatBuilder_.setMessage(value); + } + recordCase_ = 3; + return this; + } + /** + * + * + *
+     * Heartbeat record.
+     * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + */ + public Builder setHeartbeat( + com.google.spanner.executor.v1.HeartbeatRecord.Builder builderForValue) { + if (heartbeatBuilder_ == null) { + record_ = builderForValue.build(); + onChanged(); + } else { + heartbeatBuilder_.setMessage(builderForValue.build()); + } + recordCase_ = 3; + return this; + } + /** + * + * + *
+     * Heartbeat record.
+     * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + */ + public Builder mergeHeartbeat(com.google.spanner.executor.v1.HeartbeatRecord value) { + if (heartbeatBuilder_ == null) { + if (recordCase_ == 3 + && record_ != com.google.spanner.executor.v1.HeartbeatRecord.getDefaultInstance()) { + record_ = + com.google.spanner.executor.v1.HeartbeatRecord.newBuilder( + (com.google.spanner.executor.v1.HeartbeatRecord) record_) + .mergeFrom(value) + .buildPartial(); + } else { + record_ = value; + } + onChanged(); + } else { + if (recordCase_ == 3) { + heartbeatBuilder_.mergeFrom(value); + } else { + heartbeatBuilder_.setMessage(value); + } + } + recordCase_ = 3; + return this; + } + /** + * + * + *
+     * Heartbeat record.
+     * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + */ + public Builder clearHeartbeat() { + if (heartbeatBuilder_ == null) { + if (recordCase_ == 3) { + recordCase_ = 0; + record_ = null; + onChanged(); + } + } else { + if (recordCase_ == 3) { + recordCase_ = 0; + record_ = null; + } + heartbeatBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Heartbeat record.
+     * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + */ + public com.google.spanner.executor.v1.HeartbeatRecord.Builder getHeartbeatBuilder() { + return getHeartbeatFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Heartbeat record.
+     * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + */ + @java.lang.Override + public com.google.spanner.executor.v1.HeartbeatRecordOrBuilder getHeartbeatOrBuilder() { + if ((recordCase_ == 3) && (heartbeatBuilder_ != null)) { + return heartbeatBuilder_.getMessageOrBuilder(); + } else { + if (recordCase_ == 3) { + return (com.google.spanner.executor.v1.HeartbeatRecord) record_; + } + return com.google.spanner.executor.v1.HeartbeatRecord.getDefaultInstance(); + } + } + /** + * + * + *
+     * Heartbeat record.
+     * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.HeartbeatRecord, + com.google.spanner.executor.v1.HeartbeatRecord.Builder, + com.google.spanner.executor.v1.HeartbeatRecordOrBuilder> + getHeartbeatFieldBuilder() { + if (heartbeatBuilder_ == null) { + if (!(recordCase_ == 3)) { + record_ = com.google.spanner.executor.v1.HeartbeatRecord.getDefaultInstance(); + } + heartbeatBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.HeartbeatRecord, + com.google.spanner.executor.v1.HeartbeatRecord.Builder, + com.google.spanner.executor.v1.HeartbeatRecordOrBuilder>( + (com.google.spanner.executor.v1.HeartbeatRecord) record_, + getParentForChildren(), + isClean()); + record_ = null; + } + recordCase_ = 3; + onChanged(); + return heartbeatBuilder_; + } + + @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.executor.v1.ChangeStreamRecord) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ChangeStreamRecord) + private static final com.google.spanner.executor.v1.ChangeStreamRecord DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ChangeStreamRecord(); + } + + public static com.google.spanner.executor.v1.ChangeStreamRecord getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChangeStreamRecord 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.executor.v1.ChangeStreamRecord getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeStreamRecordOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeStreamRecordOrBuilder.java new file mode 100644 index 00000000000..2ad85229b56 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChangeStreamRecordOrBuilder.java @@ -0,0 +1,132 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ChangeStreamRecordOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ChangeStreamRecord) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Data change record.
+   * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + * + * @return Whether the dataChange field is set. + */ + boolean hasDataChange(); + /** + * + * + *
+   * Data change record.
+   * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + * + * @return The dataChange. + */ + com.google.spanner.executor.v1.DataChangeRecord getDataChange(); + /** + * + * + *
+   * Data change record.
+   * 
+ * + * .google.spanner.executor.v1.DataChangeRecord data_change = 1; + */ + com.google.spanner.executor.v1.DataChangeRecordOrBuilder getDataChangeOrBuilder(); + + /** + * + * + *
+   * Child partitions record.
+   * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + * + * @return Whether the childPartition field is set. + */ + boolean hasChildPartition(); + /** + * + * + *
+   * Child partitions record.
+   * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + * + * @return The childPartition. + */ + com.google.spanner.executor.v1.ChildPartitionsRecord getChildPartition(); + /** + * + * + *
+   * Child partitions record.
+   * 
+ * + * .google.spanner.executor.v1.ChildPartitionsRecord child_partition = 2; + */ + com.google.spanner.executor.v1.ChildPartitionsRecordOrBuilder getChildPartitionOrBuilder(); + + /** + * + * + *
+   * Heartbeat record.
+   * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + * + * @return Whether the heartbeat field is set. + */ + boolean hasHeartbeat(); + /** + * + * + *
+   * Heartbeat record.
+   * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + * + * @return The heartbeat. + */ + com.google.spanner.executor.v1.HeartbeatRecord getHeartbeat(); + /** + * + * + *
+   * Heartbeat record.
+   * 
+ * + * .google.spanner.executor.v1.HeartbeatRecord heartbeat = 3; + */ + com.google.spanner.executor.v1.HeartbeatRecordOrBuilder getHeartbeatOrBuilder(); + + com.google.spanner.executor.v1.ChangeStreamRecord.RecordCase getRecordCase(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChildPartitionsRecord.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChildPartitionsRecord.java new file mode 100644 index 00000000000..a4197d3585b --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChildPartitionsRecord.java @@ -0,0 +1,2473 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * ChangeStream child partition record.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ChildPartitionsRecord} + */ +public final class ChildPartitionsRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ChildPartitionsRecord) + ChildPartitionsRecordOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChildPartitionsRecord.newBuilder() to construct. + private ChildPartitionsRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChildPartitionsRecord() { + recordSequence_ = ""; + childPartitions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChildPartitionsRecord(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ChildPartitionsRecord.class, + com.google.spanner.executor.v1.ChildPartitionsRecord.Builder.class); + } + + public interface ChildPartitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Partition token string used to identify the child partition in queries.
+     * 
+ * + * string token = 1; + * + * @return The token. + */ + java.lang.String getToken(); + /** + * + * + *
+     * Partition token string used to identify the child partition in queries.
+     * 
+ * + * string token = 1; + * + * @return The bytes for token. + */ + com.google.protobuf.ByteString getTokenBytes(); + + /** + * + * + *
+     * Parent partition tokens of this child partition.
+     * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @return A list containing the parentPartitionTokens. + */ + java.util.List getParentPartitionTokensList(); + /** + * + * + *
+     * Parent partition tokens of this child partition.
+     * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @return The count of parentPartitionTokens. + */ + int getParentPartitionTokensCount(); + /** + * + * + *
+     * Parent partition tokens of this child partition.
+     * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @param index The index of the element to return. + * @return The parentPartitionTokens at the given index. + */ + java.lang.String getParentPartitionTokens(int index); + /** + * + * + *
+     * Parent partition tokens of this child partition.
+     * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @param index The index of the value to return. + * @return The bytes of the parentPartitionTokens at the given index. + */ + com.google.protobuf.ByteString getParentPartitionTokensBytes(int index); + } + /** + * + * + *
+   * A single child partition.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition} + */ + public static final class ChildPartition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition) + ChildPartitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChildPartition.newBuilder() to construct. + private ChildPartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChildPartition() { + token_ = ""; + parentPartitionTokens_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChildPartition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.class, + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + * + * + *
+     * Partition token string used to identify the child partition in queries.
+     * 
+ * + * string token = 1; + * + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + 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(); + token_ = s; + return s; + } + } + /** + * + * + *
+     * Partition token string used to identify the child partition in queries.
+     * 
+ * + * string token = 1; + * + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_PARTITION_TOKENS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList parentPartitionTokens_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Parent partition tokens of this child partition.
+     * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @return A list containing the parentPartitionTokens. + */ + public com.google.protobuf.ProtocolStringList getParentPartitionTokensList() { + return parentPartitionTokens_; + } + /** + * + * + *
+     * Parent partition tokens of this child partition.
+     * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @return The count of parentPartitionTokens. + */ + public int getParentPartitionTokensCount() { + return parentPartitionTokens_.size(); + } + /** + * + * + *
+     * Parent partition tokens of this child partition.
+     * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @param index The index of the element to return. + * @return The parentPartitionTokens at the given index. + */ + public java.lang.String getParentPartitionTokens(int index) { + return parentPartitionTokens_.get(index); + } + /** + * + * + *
+     * Parent partition tokens of this child partition.
+     * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @param index The index of the value to return. + * @return The bytes of the parentPartitionTokens at the given index. + */ + public com.google.protobuf.ByteString getParentPartitionTokensBytes(int index) { + return parentPartitionTokens_.getByteString(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(token_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_); + } + for (int i = 0; i < parentPartitionTokens_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, parentPartitionTokens_.getRaw(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(token_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_); + } + { + int dataSize = 0; + for (int i = 0; i < parentPartitionTokens_.size(); i++) { + dataSize += computeStringSizeNoTag(parentPartitionTokens_.getRaw(i)); + } + size += dataSize; + size += 1 * getParentPartitionTokensList().size(); + } + 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.executor.v1.ChildPartitionsRecord.ChildPartition)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition other = + (com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition) obj; + + if (!getToken().equals(other.getToken())) return false; + if (!getParentPartitionTokensList().equals(other.getParentPartitionTokensList())) + 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) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + if (getParentPartitionTokensCount() > 0) { + hash = (37 * hash) + PARENT_PARTITION_TOKENS_FIELD_NUMBER; + hash = (53 * hash) + getParentPartitionTokensList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition 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.executor.v1.ChildPartitionsRecord.ChildPartition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition 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.executor.v1.ChildPartitionsRecord.ChildPartition parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition 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.executor.v1.ChildPartitionsRecord.ChildPartition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition + 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.executor.v1.ChildPartitionsRecord.ChildPartition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition 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.executor.v1.ChildPartitionsRecord.ChildPartition 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 single child partition.
+     * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition) + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.class, + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder.class); + } + + // Construct using + // com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + parentPartitionTokens_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition + getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition build() { + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition buildPartial() { + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition result = + new com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + parentPartitionTokens_.makeImmutable(); + result.parentPartitionTokens_ = parentPartitionTokens_; + } + } + + @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.executor.v1.ChildPartitionsRecord.ChildPartition) { + return mergeFrom( + (com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition other) { + if (other + == com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition + .getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.parentPartitionTokens_.isEmpty()) { + if (parentPartitionTokens_.isEmpty()) { + parentPartitionTokens_ = other.parentPartitionTokens_; + bitField0_ |= 0x00000002; + } else { + ensureParentPartitionTokensIsMutable(); + parentPartitionTokens_.addAll(other.parentPartitionTokens_); + } + onChanged(); + } + 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: + { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureParentPartitionTokensIsMutable(); + parentPartitionTokens_.add(s); + break; + } // case 18 + 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 token_ = ""; + /** + * + * + *
+       * Partition token string used to identify the child partition in queries.
+       * 
+ * + * string token = 1; + * + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Partition token string used to identify the child partition in queries.
+       * 
+ * + * string token = 1; + * + * @return The bytes for token. + */ + public com.google.protobuf.ByteString getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Partition token string used to identify the child partition in queries.
+       * 
+ * + * string token = 1; + * + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Partition token string used to identify the child partition in queries.
+       * 
+ * + * string token = 1; + * + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Partition token string used to identify the child partition in queries.
+       * 
+ * + * string token = 1; + * + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList parentPartitionTokens_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureParentPartitionTokensIsMutable() { + if (!parentPartitionTokens_.isModifiable()) { + parentPartitionTokens_ = + new com.google.protobuf.LazyStringArrayList(parentPartitionTokens_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * Parent partition tokens of this child partition.
+       * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @return A list containing the parentPartitionTokens. + */ + public com.google.protobuf.ProtocolStringList getParentPartitionTokensList() { + parentPartitionTokens_.makeImmutable(); + return parentPartitionTokens_; + } + /** + * + * + *
+       * Parent partition tokens of this child partition.
+       * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @return The count of parentPartitionTokens. + */ + public int getParentPartitionTokensCount() { + return parentPartitionTokens_.size(); + } + /** + * + * + *
+       * Parent partition tokens of this child partition.
+       * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @param index The index of the element to return. + * @return The parentPartitionTokens at the given index. + */ + public java.lang.String getParentPartitionTokens(int index) { + return parentPartitionTokens_.get(index); + } + /** + * + * + *
+       * Parent partition tokens of this child partition.
+       * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @param index The index of the value to return. + * @return The bytes of the parentPartitionTokens at the given index. + */ + public com.google.protobuf.ByteString getParentPartitionTokensBytes(int index) { + return parentPartitionTokens_.getByteString(index); + } + /** + * + * + *
+       * Parent partition tokens of this child partition.
+       * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @param index The index to set the value at. + * @param value The parentPartitionTokens to set. + * @return This builder for chaining. + */ + public Builder setParentPartitionTokens(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureParentPartitionTokensIsMutable(); + parentPartitionTokens_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Parent partition tokens of this child partition.
+       * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @param value The parentPartitionTokens to add. + * @return This builder for chaining. + */ + public Builder addParentPartitionTokens(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureParentPartitionTokensIsMutable(); + parentPartitionTokens_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Parent partition tokens of this child partition.
+       * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @param values The parentPartitionTokens to add. + * @return This builder for chaining. + */ + public Builder addAllParentPartitionTokens(java.lang.Iterable values) { + ensureParentPartitionTokensIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parentPartitionTokens_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Parent partition tokens of this child partition.
+       * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @return This builder for chaining. + */ + public Builder clearParentPartitionTokens() { + parentPartitionTokens_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Parent partition tokens of this child partition.
+       * 
+ * + * repeated string parent_partition_tokens = 2; + * + * @param value The bytes of the parentPartitionTokens to add. + * @return This builder for chaining. + */ + public Builder addParentPartitionTokensBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureParentPartitionTokensIsMutable(); + parentPartitionTokens_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition) + private static final com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition(); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChildPartition 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.executor.v1.ChildPartitionsRecord.ChildPartition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Data change records returned from child partitions in this child partitions
+   * record will have a commit timestamp greater than or equal to start_time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Data change records returned from child partitions in this child partitions
+   * record will have a commit timestamp greater than or equal to start_time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Data change records returned from child partitions in this child partitions
+   * record will have a commit timestamp greater than or equal to start_time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int RECORD_SEQUENCE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object recordSequence_ = ""; + /** + * + * + *
+   * A monotonically increasing sequence number that can be used to define the
+   * ordering of the child partitions record when there are multiple child
+   * partitions records returned with the same start_time in a particular
+   * partition.
+   * 
+ * + * string record_sequence = 2; + * + * @return The recordSequence. + */ + @java.lang.Override + public java.lang.String getRecordSequence() { + java.lang.Object ref = recordSequence_; + 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(); + recordSequence_ = s; + return s; + } + } + /** + * + * + *
+   * A monotonically increasing sequence number that can be used to define the
+   * ordering of the child partitions record when there are multiple child
+   * partitions records returned with the same start_time in a particular
+   * partition.
+   * 
+ * + * string record_sequence = 2; + * + * @return The bytes for recordSequence. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRecordSequenceBytes() { + java.lang.Object ref = recordSequence_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + recordSequence_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHILD_PARTITIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + childPartitions_; + /** + * + * + *
+   * A set of child partitions and their associated information.
+   * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + @java.lang.Override + public java.util.List + getChildPartitionsList() { + return childPartitions_; + } + /** + * + * + *
+   * A set of child partitions and their associated information.
+   * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder> + getChildPartitionsOrBuilderList() { + return childPartitions_; + } + /** + * + * + *
+   * A set of child partitions and their associated information.
+   * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + @java.lang.Override + public int getChildPartitionsCount() { + return childPartitions_.size(); + } + /** + * + * + *
+   * A set of child partitions and their associated information.
+   * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition getChildPartitions( + int index) { + return childPartitions_.get(index); + } + /** + * + * + *
+   * A set of child partitions and their associated information.
+   * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder + getChildPartitionsOrBuilder(int index) { + return childPartitions_.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 (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordSequence_); + } + for (int i = 0; i < childPartitions_.size(); i++) { + output.writeMessage(3, childPartitions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recordSequence_); + } + for (int i = 0; i < childPartitions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, childPartitions_.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.executor.v1.ChildPartitionsRecord)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ChildPartitionsRecord other = + (com.google.spanner.executor.v1.ChildPartitionsRecord) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (!getRecordSequence().equals(other.getRecordSequence())) return false; + if (!getChildPartitionsList().equals(other.getChildPartitionsList())) 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 (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + hash = (37 * hash) + RECORD_SEQUENCE_FIELD_NUMBER; + hash = (53 * hash) + getRecordSequence().hashCode(); + if (getChildPartitionsCount() > 0) { + hash = (37 * hash) + CHILD_PARTITIONS_FIELD_NUMBER; + hash = (53 * hash) + getChildPartitionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord 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.executor.v1.ChildPartitionsRecord parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord 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.executor.v1.ChildPartitionsRecord parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord 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.executor.v1.ChildPartitionsRecord parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord 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.executor.v1.ChildPartitionsRecord parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord 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.executor.v1.ChildPartitionsRecord 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; + } + /** + * + * + *
+   * ChangeStream child partition record.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ChildPartitionsRecord} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ChildPartitionsRecord) + com.google.spanner.executor.v1.ChildPartitionsRecordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ChildPartitionsRecord.class, + com.google.spanner.executor.v1.ChildPartitionsRecord.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ChildPartitionsRecord.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + recordSequence_ = ""; + if (childPartitionsBuilder_ == null) { + childPartitions_ = java.util.Collections.emptyList(); + } else { + childPartitions_ = null; + childPartitionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ChildPartitionsRecord_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ChildPartitionsRecord getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ChildPartitionsRecord.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ChildPartitionsRecord build() { + com.google.spanner.executor.v1.ChildPartitionsRecord result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ChildPartitionsRecord buildPartial() { + com.google.spanner.executor.v1.ChildPartitionsRecord result = + new com.google.spanner.executor.v1.ChildPartitionsRecord(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.ChildPartitionsRecord result) { + if (childPartitionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + childPartitions_ = java.util.Collections.unmodifiableList(childPartitions_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.childPartitions_ = childPartitions_; + } else { + result.childPartitions_ = childPartitionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.ChildPartitionsRecord result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.recordSequence_ = recordSequence_; + } + } + + @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.executor.v1.ChildPartitionsRecord) { + return mergeFrom((com.google.spanner.executor.v1.ChildPartitionsRecord) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ChildPartitionsRecord other) { + if (other == com.google.spanner.executor.v1.ChildPartitionsRecord.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (!other.getRecordSequence().isEmpty()) { + recordSequence_ = other.recordSequence_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (childPartitionsBuilder_ == null) { + if (!other.childPartitions_.isEmpty()) { + if (childPartitions_.isEmpty()) { + childPartitions_ = other.childPartitions_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureChildPartitionsIsMutable(); + childPartitions_.addAll(other.childPartitions_); + } + onChanged(); + } + } else { + if (!other.childPartitions_.isEmpty()) { + if (childPartitionsBuilder_.isEmpty()) { + childPartitionsBuilder_.dispose(); + childPartitionsBuilder_ = null; + childPartitions_ = other.childPartitions_; + bitField0_ = (bitField0_ & ~0x00000004); + childPartitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChildPartitionsFieldBuilder() + : null; + } else { + childPartitionsBuilder_.addAllMessages(other.childPartitions_); + } + } + } + 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: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + recordSequence_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition m = + input.readMessage( + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition + .parser(), + extensionRegistry); + if (childPartitionsBuilder_ == null) { + ensureChildPartitionsIsMutable(); + childPartitions_.add(m); + } else { + childPartitionsBuilder_.addMessage(m); + } + 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.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Data change records returned from child partitions in this child partitions
+     * record will have a commit timestamp greater than or equal to start_time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Data change records returned from child partitions in this child partitions
+     * record will have a commit timestamp greater than or equal to start_time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Data change records returned from child partitions in this child partitions
+     * record will have a commit timestamp greater than or equal to start_time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Data change records returned from child partitions in this child partitions
+     * record will have a commit timestamp greater than or equal to start_time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Data change records returned from child partitions in this child partitions
+     * record will have a commit timestamp greater than or equal to start_time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Data change records returned from child partitions in this child partitions
+     * record will have a commit timestamp greater than or equal to start_time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Data change records returned from child partitions in this child partitions
+     * record will have a commit timestamp greater than or equal to start_time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Data change records returned from child partitions in this child partitions
+     * record will have a commit timestamp greater than or equal to start_time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Data change records returned from child partitions in this child partitions
+     * record will have a commit timestamp greater than or equal to start_time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private java.lang.Object recordSequence_ = ""; + /** + * + * + *
+     * A monotonically increasing sequence number that can be used to define the
+     * ordering of the child partitions record when there are multiple child
+     * partitions records returned with the same start_time in a particular
+     * partition.
+     * 
+ * + * string record_sequence = 2; + * + * @return The recordSequence. + */ + public java.lang.String getRecordSequence() { + java.lang.Object ref = recordSequence_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + recordSequence_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A monotonically increasing sequence number that can be used to define the
+     * ordering of the child partitions record when there are multiple child
+     * partitions records returned with the same start_time in a particular
+     * partition.
+     * 
+ * + * string record_sequence = 2; + * + * @return The bytes for recordSequence. + */ + public com.google.protobuf.ByteString getRecordSequenceBytes() { + java.lang.Object ref = recordSequence_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + recordSequence_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A monotonically increasing sequence number that can be used to define the
+     * ordering of the child partitions record when there are multiple child
+     * partitions records returned with the same start_time in a particular
+     * partition.
+     * 
+ * + * string record_sequence = 2; + * + * @param value The recordSequence to set. + * @return This builder for chaining. + */ + public Builder setRecordSequence(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + recordSequence_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A monotonically increasing sequence number that can be used to define the
+     * ordering of the child partitions record when there are multiple child
+     * partitions records returned with the same start_time in a particular
+     * partition.
+     * 
+ * + * string record_sequence = 2; + * + * @return This builder for chaining. + */ + public Builder clearRecordSequence() { + recordSequence_ = getDefaultInstance().getRecordSequence(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A monotonically increasing sequence number that can be used to define the
+     * ordering of the child partitions record when there are multiple child
+     * partitions records returned with the same start_time in a particular
+     * partition.
+     * 
+ * + * string record_sequence = 2; + * + * @param value The bytes for recordSequence to set. + * @return This builder for chaining. + */ + public Builder setRecordSequenceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + recordSequence_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List + childPartitions_ = java.util.Collections.emptyList(); + + private void ensureChildPartitionsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + childPartitions_ = + new java.util.ArrayList< + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition>( + childPartitions_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition, + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder, + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder> + childPartitionsBuilder_; + + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public java.util.List + getChildPartitionsList() { + if (childPartitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(childPartitions_); + } else { + return childPartitionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public int getChildPartitionsCount() { + if (childPartitionsBuilder_ == null) { + return childPartitions_.size(); + } else { + return childPartitionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition getChildPartitions( + int index) { + if (childPartitionsBuilder_ == null) { + return childPartitions_.get(index); + } else { + return childPartitionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public Builder setChildPartitions( + int index, com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition value) { + if (childPartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChildPartitionsIsMutable(); + childPartitions_.set(index, value); + onChanged(); + } else { + childPartitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public Builder setChildPartitions( + int index, + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder + builderForValue) { + if (childPartitionsBuilder_ == null) { + ensureChildPartitionsIsMutable(); + childPartitions_.set(index, builderForValue.build()); + onChanged(); + } else { + childPartitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public Builder addChildPartitions( + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition value) { + if (childPartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChildPartitionsIsMutable(); + childPartitions_.add(value); + onChanged(); + } else { + childPartitionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public Builder addChildPartitions( + int index, com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition value) { + if (childPartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChildPartitionsIsMutable(); + childPartitions_.add(index, value); + onChanged(); + } else { + childPartitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public Builder addChildPartitions( + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder + builderForValue) { + if (childPartitionsBuilder_ == null) { + ensureChildPartitionsIsMutable(); + childPartitions_.add(builderForValue.build()); + onChanged(); + } else { + childPartitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public Builder addChildPartitions( + int index, + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder + builderForValue) { + if (childPartitionsBuilder_ == null) { + ensureChildPartitionsIsMutable(); + childPartitions_.add(index, builderForValue.build()); + onChanged(); + } else { + childPartitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public Builder addAllChildPartitions( + java.lang.Iterable< + ? extends com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition> + values) { + if (childPartitionsBuilder_ == null) { + ensureChildPartitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, childPartitions_); + onChanged(); + } else { + childPartitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public Builder clearChildPartitions() { + if (childPartitionsBuilder_ == null) { + childPartitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + childPartitionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public Builder removeChildPartitions(int index) { + if (childPartitionsBuilder_ == null) { + ensureChildPartitionsIsMutable(); + childPartitions_.remove(index); + onChanged(); + } else { + childPartitionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder + getChildPartitionsBuilder(int index) { + return getChildPartitionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder + getChildPartitionsOrBuilder(int index) { + if (childPartitionsBuilder_ == null) { + return childPartitions_.get(index); + } else { + return childPartitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public java.util.List< + ? extends com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder> + getChildPartitionsOrBuilderList() { + if (childPartitionsBuilder_ != null) { + return childPartitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(childPartitions_); + } + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder + addChildPartitionsBuilder() { + return getChildPartitionsFieldBuilder() + .addBuilder( + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition + .getDefaultInstance()); + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder + addChildPartitionsBuilder(int index) { + return getChildPartitionsFieldBuilder() + .addBuilder( + index, + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition + .getDefaultInstance()); + } + /** + * + * + *
+     * A set of child partitions and their associated information.
+     * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + public java.util.List< + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder> + getChildPartitionsBuilderList() { + return getChildPartitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition, + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder, + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder> + getChildPartitionsFieldBuilder() { + if (childPartitionsBuilder_ == null) { + childPartitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition, + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition.Builder, + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder>( + childPartitions_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + childPartitions_ = null; + } + return childPartitionsBuilder_; + } + + @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.executor.v1.ChildPartitionsRecord) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ChildPartitionsRecord) + private static final com.google.spanner.executor.v1.ChildPartitionsRecord DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ChildPartitionsRecord(); + } + + public static com.google.spanner.executor.v1.ChildPartitionsRecord getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChildPartitionsRecord 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.executor.v1.ChildPartitionsRecord getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChildPartitionsRecordOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChildPartitionsRecordOrBuilder.java new file mode 100644 index 00000000000..14f6b486013 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ChildPartitionsRecordOrBuilder.java @@ -0,0 +1,159 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ChildPartitionsRecordOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ChildPartitionsRecord) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Data change records returned from child partitions in this child partitions
+   * record will have a commit timestamp greater than or equal to start_time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Data change records returned from child partitions in this child partitions
+   * record will have a commit timestamp greater than or equal to start_time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Data change records returned from child partitions in this child partitions
+   * record will have a commit timestamp greater than or equal to start_time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * A monotonically increasing sequence number that can be used to define the
+   * ordering of the child partitions record when there are multiple child
+   * partitions records returned with the same start_time in a particular
+   * partition.
+   * 
+ * + * string record_sequence = 2; + * + * @return The recordSequence. + */ + java.lang.String getRecordSequence(); + /** + * + * + *
+   * A monotonically increasing sequence number that can be used to define the
+   * ordering of the child partitions record when there are multiple child
+   * partitions records returned with the same start_time in a particular
+   * partition.
+   * 
+ * + * string record_sequence = 2; + * + * @return The bytes for recordSequence. + */ + com.google.protobuf.ByteString getRecordSequenceBytes(); + + /** + * + * + *
+   * A set of child partitions and their associated information.
+   * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + java.util.List + getChildPartitionsList(); + /** + * + * + *
+   * A set of child partitions and their associated information.
+   * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition getChildPartitions(int index); + /** + * + * + *
+   * A set of child partitions and their associated information.
+   * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + int getChildPartitionsCount(); + /** + * + * + *
+   * A set of child partitions and their associated information.
+   * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + java.util.List< + ? extends com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder> + getChildPartitionsOrBuilderList(); + /** + * + * + *
+   * A set of child partitions and their associated information.
+   * 
+ * + * + * repeated .google.spanner.executor.v1.ChildPartitionsRecord.ChildPartition child_partitions = 3; + * + */ + com.google.spanner.executor.v1.ChildPartitionsRecord.ChildPartitionOrBuilder + getChildPartitionsOrBuilder(int index); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloseBatchTransactionAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloseBatchTransactionAction.java new file mode 100644 index 00000000000..3620bf80b9c --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloseBatchTransactionAction.java @@ -0,0 +1,551 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Closes or cleans up the currently opened batch read-only transaction.
+ *
+ * Once a transaction is closed, the Executor can be disposed of or used to
+ * start start another transaction. Closing a batch transaction in one Executor
+ * doesn't affect the transaction's state in other Executors that also read from
+ * it.
+ *
+ * When a transaction is cleaned up, it becomes globally invalid. Cleaning up is
+ * optional, but recommended.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CloseBatchTransactionAction} + */ +public final class CloseBatchTransactionAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CloseBatchTransactionAction) + CloseBatchTransactionActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloseBatchTransactionAction.newBuilder() to construct. + private CloseBatchTransactionAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloseBatchTransactionAction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloseBatchTransactionAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CloseBatchTransactionAction.class, + com.google.spanner.executor.v1.CloseBatchTransactionAction.Builder.class); + } + + public static final int CLEANUP_FIELD_NUMBER = 1; + private boolean cleanup_ = false; + /** + * + * + *
+   * Indicates whether the transaction needs to be cleaned up.
+   * 
+ * + * bool cleanup = 1; + * + * @return The cleanup. + */ + @java.lang.Override + public boolean getCleanup() { + return cleanup_; + } + + 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 (cleanup_ != false) { + output.writeBool(1, cleanup_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cleanup_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, cleanup_); + } + 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.executor.v1.CloseBatchTransactionAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.CloseBatchTransactionAction other = + (com.google.spanner.executor.v1.CloseBatchTransactionAction) obj; + + if (getCleanup() != other.getCleanup()) 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) + CLEANUP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCleanup()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.CloseBatchTransactionAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloseBatchTransactionAction 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.executor.v1.CloseBatchTransactionAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloseBatchTransactionAction 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.executor.v1.CloseBatchTransactionAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloseBatchTransactionAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.CloseBatchTransactionAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloseBatchTransactionAction 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.executor.v1.CloseBatchTransactionAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloseBatchTransactionAction 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.executor.v1.CloseBatchTransactionAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloseBatchTransactionAction 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.executor.v1.CloseBatchTransactionAction 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; + } + /** + * + * + *
+   * Closes or cleans up the currently opened batch read-only transaction.
+   *
+   * Once a transaction is closed, the Executor can be disposed of or used to
+   * start start another transaction. Closing a batch transaction in one Executor
+   * doesn't affect the transaction's state in other Executors that also read from
+   * it.
+   *
+   * When a transaction is cleaned up, it becomes globally invalid. Cleaning up is
+   * optional, but recommended.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CloseBatchTransactionAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CloseBatchTransactionAction) + com.google.spanner.executor.v1.CloseBatchTransactionActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CloseBatchTransactionAction.class, + com.google.spanner.executor.v1.CloseBatchTransactionAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.CloseBatchTransactionAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cleanup_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloseBatchTransactionAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.CloseBatchTransactionAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloseBatchTransactionAction build() { + com.google.spanner.executor.v1.CloseBatchTransactionAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloseBatchTransactionAction buildPartial() { + com.google.spanner.executor.v1.CloseBatchTransactionAction result = + new com.google.spanner.executor.v1.CloseBatchTransactionAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.CloseBatchTransactionAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cleanup_ = cleanup_; + } + } + + @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.executor.v1.CloseBatchTransactionAction) { + return mergeFrom((com.google.spanner.executor.v1.CloseBatchTransactionAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.CloseBatchTransactionAction other) { + if (other == com.google.spanner.executor.v1.CloseBatchTransactionAction.getDefaultInstance()) + return this; + if (other.getCleanup() != false) { + setCleanup(other.getCleanup()); + } + 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: + { + cleanup_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 boolean cleanup_; + /** + * + * + *
+     * Indicates whether the transaction needs to be cleaned up.
+     * 
+ * + * bool cleanup = 1; + * + * @return The cleanup. + */ + @java.lang.Override + public boolean getCleanup() { + return cleanup_; + } + /** + * + * + *
+     * Indicates whether the transaction needs to be cleaned up.
+     * 
+ * + * bool cleanup = 1; + * + * @param value The cleanup to set. + * @return This builder for chaining. + */ + public Builder setCleanup(boolean value) { + + cleanup_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates whether the transaction needs to be cleaned up.
+     * 
+ * + * bool cleanup = 1; + * + * @return This builder for chaining. + */ + public Builder clearCleanup() { + bitField0_ = (bitField0_ & ~0x00000001); + cleanup_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.CloseBatchTransactionAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.CloseBatchTransactionAction) + private static final com.google.spanner.executor.v1.CloseBatchTransactionAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.CloseBatchTransactionAction(); + } + + public static com.google.spanner.executor.v1.CloseBatchTransactionAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloseBatchTransactionAction 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.executor.v1.CloseBatchTransactionAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloseBatchTransactionActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloseBatchTransactionActionOrBuilder.java new file mode 100644 index 00000000000..e03dd6b1d39 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloseBatchTransactionActionOrBuilder.java @@ -0,0 +1,38 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface CloseBatchTransactionActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CloseBatchTransactionAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Indicates whether the transaction needs to be cleaned up.
+   * 
+ * + * bool cleanup = 1; + * + * @return The cleanup. + */ + boolean getCleanup(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudBackupResponse.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudBackupResponse.java new file mode 100644 index 00000000000..c07e07e8ada --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudBackupResponse.java @@ -0,0 +1,1891 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * CloudBackupResponse contains results returned by cloud backup related
+ * actions.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CloudBackupResponse} + */ +public final class CloudBackupResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CloudBackupResponse) + CloudBackupResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudBackupResponse.newBuilder() to construct. + private CloudBackupResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudBackupResponse() { + listedBackups_ = java.util.Collections.emptyList(); + listedBackupOperations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudBackupResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudBackupResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudBackupResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CloudBackupResponse.class, + com.google.spanner.executor.v1.CloudBackupResponse.Builder.class); + } + + public static final int LISTED_BACKUPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List listedBackups_; + /** + * + * + *
+   * List of backups returned by ListCloudBackupsAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + @java.lang.Override + public java.util.List getListedBackupsList() { + return listedBackups_; + } + /** + * + * + *
+   * List of backups returned by ListCloudBackupsAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + @java.lang.Override + public java.util.List + getListedBackupsOrBuilderList() { + return listedBackups_; + } + /** + * + * + *
+   * List of backups returned by ListCloudBackupsAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + @java.lang.Override + public int getListedBackupsCount() { + return listedBackups_.size(); + } + /** + * + * + *
+   * List of backups returned by ListCloudBackupsAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.Backup getListedBackups(int index) { + return listedBackups_.get(index); + } + /** + * + * + *
+   * List of backups returned by ListCloudBackupsAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.BackupOrBuilder getListedBackupsOrBuilder(int index) { + return listedBackups_.get(index); + } + + public static final int LISTED_BACKUP_OPERATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List listedBackupOperations_; + /** + * + * + *
+   * List of operations returned by ListCloudBackupOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + @java.lang.Override + public java.util.List getListedBackupOperationsList() { + return listedBackupOperations_; + } + /** + * + * + *
+   * List of operations returned by ListCloudBackupOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + @java.lang.Override + public java.util.List + getListedBackupOperationsOrBuilderList() { + return listedBackupOperations_; + } + /** + * + * + *
+   * List of operations returned by ListCloudBackupOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + @java.lang.Override + public int getListedBackupOperationsCount() { + return listedBackupOperations_.size(); + } + /** + * + * + *
+   * List of operations returned by ListCloudBackupOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + @java.lang.Override + public com.google.longrunning.Operation getListedBackupOperations(int index) { + return listedBackupOperations_.get(index); + } + /** + * + * + *
+   * List of operations returned by ListCloudBackupOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + @java.lang.Override + public com.google.longrunning.OperationOrBuilder getListedBackupOperationsOrBuilder(int index) { + return listedBackupOperations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_FIELD_NUMBER = 4; + private com.google.spanner.admin.database.v1.Backup backup_; + /** + * + * + *
+   * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+   * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + * + * @return Whether the backup field is set. + */ + @java.lang.Override + public boolean hasBackup() { + return backup_ != null; + } + /** + * + * + *
+   * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+   * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + * + * @return The backup. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.Backup getBackup() { + return backup_ == null + ? com.google.spanner.admin.database.v1.Backup.getDefaultInstance() + : backup_; + } + /** + * + * + *
+   * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+   * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.BackupOrBuilder getBackupOrBuilder() { + return backup_ == null + ? com.google.spanner.admin.database.v1.Backup.getDefaultInstance() + : backup_; + } + + 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 < listedBackups_.size(); i++) { + output.writeMessage(1, listedBackups_.get(i)); + } + for (int i = 0; i < listedBackupOperations_.size(); i++) { + output.writeMessage(2, listedBackupOperations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); + } + if (backup_ != null) { + output.writeMessage(4, getBackup()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < listedBackups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, listedBackups_.get(i)); + } + for (int i = 0; i < listedBackupOperations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, listedBackupOperations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); + } + if (backup_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBackup()); + } + 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.executor.v1.CloudBackupResponse)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.CloudBackupResponse other = + (com.google.spanner.executor.v1.CloudBackupResponse) obj; + + if (!getListedBackupsList().equals(other.getListedBackupsList())) return false; + if (!getListedBackupOperationsList().equals(other.getListedBackupOperationsList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (hasBackup() != other.hasBackup()) return false; + if (hasBackup()) { + if (!getBackup().equals(other.getBackup())) 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 (getListedBackupsCount() > 0) { + hash = (37 * hash) + LISTED_BACKUPS_FIELD_NUMBER; + hash = (53 * hash) + getListedBackupsList().hashCode(); + } + if (getListedBackupOperationsCount() > 0) { + hash = (37 * hash) + LISTED_BACKUP_OPERATIONS_FIELD_NUMBER; + hash = (53 * hash) + getListedBackupOperationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (hasBackup()) { + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.CloudBackupResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloudBackupResponse 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.executor.v1.CloudBackupResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloudBackupResponse 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.executor.v1.CloudBackupResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloudBackupResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.CloudBackupResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloudBackupResponse 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.executor.v1.CloudBackupResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloudBackupResponse 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.executor.v1.CloudBackupResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloudBackupResponse 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.executor.v1.CloudBackupResponse 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; + } + /** + * + * + *
+   * CloudBackupResponse contains results returned by cloud backup related
+   * actions.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CloudBackupResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CloudBackupResponse) + com.google.spanner.executor.v1.CloudBackupResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudBackupResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudBackupResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CloudBackupResponse.class, + com.google.spanner.executor.v1.CloudBackupResponse.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.CloudBackupResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (listedBackupsBuilder_ == null) { + listedBackups_ = java.util.Collections.emptyList(); + } else { + listedBackups_ = null; + listedBackupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (listedBackupOperationsBuilder_ == null) { + listedBackupOperations_ = java.util.Collections.emptyList(); + } else { + listedBackupOperations_ = null; + listedBackupOperationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + nextPageToken_ = ""; + backup_ = null; + if (backupBuilder_ != null) { + backupBuilder_.dispose(); + backupBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudBackupResponse_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloudBackupResponse getDefaultInstanceForType() { + return com.google.spanner.executor.v1.CloudBackupResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloudBackupResponse build() { + com.google.spanner.executor.v1.CloudBackupResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloudBackupResponse buildPartial() { + com.google.spanner.executor.v1.CloudBackupResponse result = + new com.google.spanner.executor.v1.CloudBackupResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.CloudBackupResponse result) { + if (listedBackupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + listedBackups_ = java.util.Collections.unmodifiableList(listedBackups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.listedBackups_ = listedBackups_; + } else { + result.listedBackups_ = listedBackupsBuilder_.build(); + } + if (listedBackupOperationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + listedBackupOperations_ = java.util.Collections.unmodifiableList(listedBackupOperations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.listedBackupOperations_ = listedBackupOperations_; + } else { + result.listedBackupOperations_ = listedBackupOperationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.CloudBackupResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.backup_ = backupBuilder_ == null ? backup_ : backupBuilder_.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.executor.v1.CloudBackupResponse) { + return mergeFrom((com.google.spanner.executor.v1.CloudBackupResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.CloudBackupResponse other) { + if (other == com.google.spanner.executor.v1.CloudBackupResponse.getDefaultInstance()) + return this; + if (listedBackupsBuilder_ == null) { + if (!other.listedBackups_.isEmpty()) { + if (listedBackups_.isEmpty()) { + listedBackups_ = other.listedBackups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListedBackupsIsMutable(); + listedBackups_.addAll(other.listedBackups_); + } + onChanged(); + } + } else { + if (!other.listedBackups_.isEmpty()) { + if (listedBackupsBuilder_.isEmpty()) { + listedBackupsBuilder_.dispose(); + listedBackupsBuilder_ = null; + listedBackups_ = other.listedBackups_; + bitField0_ = (bitField0_ & ~0x00000001); + listedBackupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getListedBackupsFieldBuilder() + : null; + } else { + listedBackupsBuilder_.addAllMessages(other.listedBackups_); + } + } + } + if (listedBackupOperationsBuilder_ == null) { + if (!other.listedBackupOperations_.isEmpty()) { + if (listedBackupOperations_.isEmpty()) { + listedBackupOperations_ = other.listedBackupOperations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureListedBackupOperationsIsMutable(); + listedBackupOperations_.addAll(other.listedBackupOperations_); + } + onChanged(); + } + } else { + if (!other.listedBackupOperations_.isEmpty()) { + if (listedBackupOperationsBuilder_.isEmpty()) { + listedBackupOperationsBuilder_.dispose(); + listedBackupOperationsBuilder_ = null; + listedBackupOperations_ = other.listedBackupOperations_; + bitField0_ = (bitField0_ & ~0x00000002); + listedBackupOperationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getListedBackupOperationsFieldBuilder() + : null; + } else { + listedBackupOperationsBuilder_.addAllMessages(other.listedBackupOperations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasBackup()) { + mergeBackup(other.getBackup()); + } + 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.admin.database.v1.Backup m = + input.readMessage( + com.google.spanner.admin.database.v1.Backup.parser(), extensionRegistry); + if (listedBackupsBuilder_ == null) { + ensureListedBackupsIsMutable(); + listedBackups_.add(m); + } else { + listedBackupsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.longrunning.Operation m = + input.readMessage(com.google.longrunning.Operation.parser(), extensionRegistry); + if (listedBackupOperationsBuilder_ == null) { + ensureListedBackupOperationsIsMutable(); + listedBackupOperations_.add(m); + } else { + listedBackupOperationsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + 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.util.List listedBackups_ = + java.util.Collections.emptyList(); + + private void ensureListedBackupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + listedBackups_ = + new java.util.ArrayList(listedBackups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.database.v1.Backup, + com.google.spanner.admin.database.v1.Backup.Builder, + com.google.spanner.admin.database.v1.BackupOrBuilder> + listedBackupsBuilder_; + + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public java.util.List getListedBackupsList() { + if (listedBackupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(listedBackups_); + } else { + return listedBackupsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public int getListedBackupsCount() { + if (listedBackupsBuilder_ == null) { + return listedBackups_.size(); + } else { + return listedBackupsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public com.google.spanner.admin.database.v1.Backup getListedBackups(int index) { + if (listedBackupsBuilder_ == null) { + return listedBackups_.get(index); + } else { + return listedBackupsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public Builder setListedBackups(int index, com.google.spanner.admin.database.v1.Backup value) { + if (listedBackupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedBackupsIsMutable(); + listedBackups_.set(index, value); + onChanged(); + } else { + listedBackupsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public Builder setListedBackups( + int index, com.google.spanner.admin.database.v1.Backup.Builder builderForValue) { + if (listedBackupsBuilder_ == null) { + ensureListedBackupsIsMutable(); + listedBackups_.set(index, builderForValue.build()); + onChanged(); + } else { + listedBackupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public Builder addListedBackups(com.google.spanner.admin.database.v1.Backup value) { + if (listedBackupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedBackupsIsMutable(); + listedBackups_.add(value); + onChanged(); + } else { + listedBackupsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public Builder addListedBackups(int index, com.google.spanner.admin.database.v1.Backup value) { + if (listedBackupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedBackupsIsMutable(); + listedBackups_.add(index, value); + onChanged(); + } else { + listedBackupsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public Builder addListedBackups( + com.google.spanner.admin.database.v1.Backup.Builder builderForValue) { + if (listedBackupsBuilder_ == null) { + ensureListedBackupsIsMutable(); + listedBackups_.add(builderForValue.build()); + onChanged(); + } else { + listedBackupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public Builder addListedBackups( + int index, com.google.spanner.admin.database.v1.Backup.Builder builderForValue) { + if (listedBackupsBuilder_ == null) { + ensureListedBackupsIsMutable(); + listedBackups_.add(index, builderForValue.build()); + onChanged(); + } else { + listedBackupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public Builder addAllListedBackups( + java.lang.Iterable values) { + if (listedBackupsBuilder_ == null) { + ensureListedBackupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, listedBackups_); + onChanged(); + } else { + listedBackupsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public Builder clearListedBackups() { + if (listedBackupsBuilder_ == null) { + listedBackups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listedBackupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public Builder removeListedBackups(int index) { + if (listedBackupsBuilder_ == null) { + ensureListedBackupsIsMutable(); + listedBackups_.remove(index); + onChanged(); + } else { + listedBackupsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public com.google.spanner.admin.database.v1.Backup.Builder getListedBackupsBuilder(int index) { + return getListedBackupsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public com.google.spanner.admin.database.v1.BackupOrBuilder getListedBackupsOrBuilder( + int index) { + if (listedBackupsBuilder_ == null) { + return listedBackups_.get(index); + } else { + return listedBackupsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public java.util.List + getListedBackupsOrBuilderList() { + if (listedBackupsBuilder_ != null) { + return listedBackupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(listedBackups_); + } + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public com.google.spanner.admin.database.v1.Backup.Builder addListedBackupsBuilder() { + return getListedBackupsFieldBuilder() + .addBuilder(com.google.spanner.admin.database.v1.Backup.getDefaultInstance()); + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public com.google.spanner.admin.database.v1.Backup.Builder addListedBackupsBuilder(int index) { + return getListedBackupsFieldBuilder() + .addBuilder(index, com.google.spanner.admin.database.v1.Backup.getDefaultInstance()); + } + /** + * + * + *
+     * List of backups returned by ListCloudBackupsAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + public java.util.List + getListedBackupsBuilderList() { + return getListedBackupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.database.v1.Backup, + com.google.spanner.admin.database.v1.Backup.Builder, + com.google.spanner.admin.database.v1.BackupOrBuilder> + getListedBackupsFieldBuilder() { + if (listedBackupsBuilder_ == null) { + listedBackupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.database.v1.Backup, + com.google.spanner.admin.database.v1.Backup.Builder, + com.google.spanner.admin.database.v1.BackupOrBuilder>( + listedBackups_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + listedBackups_ = null; + } + return listedBackupsBuilder_; + } + + private java.util.List listedBackupOperations_ = + java.util.Collections.emptyList(); + + private void ensureListedBackupOperationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + listedBackupOperations_ = + new java.util.ArrayList(listedBackupOperations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder> + listedBackupOperationsBuilder_; + + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public java.util.List getListedBackupOperationsList() { + if (listedBackupOperationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(listedBackupOperations_); + } else { + return listedBackupOperationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public int getListedBackupOperationsCount() { + if (listedBackupOperationsBuilder_ == null) { + return listedBackupOperations_.size(); + } else { + return listedBackupOperationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public com.google.longrunning.Operation getListedBackupOperations(int index) { + if (listedBackupOperationsBuilder_ == null) { + return listedBackupOperations_.get(index); + } else { + return listedBackupOperationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public Builder setListedBackupOperations(int index, com.google.longrunning.Operation value) { + if (listedBackupOperationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedBackupOperationsIsMutable(); + listedBackupOperations_.set(index, value); + onChanged(); + } else { + listedBackupOperationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public Builder setListedBackupOperations( + int index, com.google.longrunning.Operation.Builder builderForValue) { + if (listedBackupOperationsBuilder_ == null) { + ensureListedBackupOperationsIsMutable(); + listedBackupOperations_.set(index, builderForValue.build()); + onChanged(); + } else { + listedBackupOperationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public Builder addListedBackupOperations(com.google.longrunning.Operation value) { + if (listedBackupOperationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedBackupOperationsIsMutable(); + listedBackupOperations_.add(value); + onChanged(); + } else { + listedBackupOperationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public Builder addListedBackupOperations(int index, com.google.longrunning.Operation value) { + if (listedBackupOperationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedBackupOperationsIsMutable(); + listedBackupOperations_.add(index, value); + onChanged(); + } else { + listedBackupOperationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public Builder addListedBackupOperations( + com.google.longrunning.Operation.Builder builderForValue) { + if (listedBackupOperationsBuilder_ == null) { + ensureListedBackupOperationsIsMutable(); + listedBackupOperations_.add(builderForValue.build()); + onChanged(); + } else { + listedBackupOperationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public Builder addListedBackupOperations( + int index, com.google.longrunning.Operation.Builder builderForValue) { + if (listedBackupOperationsBuilder_ == null) { + ensureListedBackupOperationsIsMutable(); + listedBackupOperations_.add(index, builderForValue.build()); + onChanged(); + } else { + listedBackupOperationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public Builder addAllListedBackupOperations( + java.lang.Iterable values) { + if (listedBackupOperationsBuilder_ == null) { + ensureListedBackupOperationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, listedBackupOperations_); + onChanged(); + } else { + listedBackupOperationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public Builder clearListedBackupOperations() { + if (listedBackupOperationsBuilder_ == null) { + listedBackupOperations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + listedBackupOperationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public Builder removeListedBackupOperations(int index) { + if (listedBackupOperationsBuilder_ == null) { + ensureListedBackupOperationsIsMutable(); + listedBackupOperations_.remove(index); + onChanged(); + } else { + listedBackupOperationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public com.google.longrunning.Operation.Builder getListedBackupOperationsBuilder(int index) { + return getListedBackupOperationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public com.google.longrunning.OperationOrBuilder getListedBackupOperationsOrBuilder(int index) { + if (listedBackupOperationsBuilder_ == null) { + return listedBackupOperations_.get(index); + } else { + return listedBackupOperationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public java.util.List + getListedBackupOperationsOrBuilderList() { + if (listedBackupOperationsBuilder_ != null) { + return listedBackupOperationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(listedBackupOperations_); + } + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public com.google.longrunning.Operation.Builder addListedBackupOperationsBuilder() { + return getListedBackupOperationsFieldBuilder() + .addBuilder(com.google.longrunning.Operation.getDefaultInstance()); + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public com.google.longrunning.Operation.Builder addListedBackupOperationsBuilder(int index) { + return getListedBackupOperationsFieldBuilder() + .addBuilder(index, com.google.longrunning.Operation.getDefaultInstance()); + } + /** + * + * + *
+     * List of operations returned by ListCloudBackupOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + public java.util.List + getListedBackupOperationsBuilderList() { + return getListedBackupOperationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder> + getListedBackupOperationsFieldBuilder() { + if (listedBackupOperationsBuilder_ == null) { + listedBackupOperationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder>( + listedBackupOperations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + listedBackupOperations_ = null; + } + return listedBackupOperationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 3; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 3; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.spanner.admin.database.v1.Backup backup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.Backup, + com.google.spanner.admin.database.v1.Backup.Builder, + com.google.spanner.admin.database.v1.BackupOrBuilder> + backupBuilder_; + /** + * + * + *
+     * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+     * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + * + * @return Whether the backup field is set. + */ + public boolean hasBackup() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+     * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + * + * @return The backup. + */ + public com.google.spanner.admin.database.v1.Backup getBackup() { + if (backupBuilder_ == null) { + return backup_ == null + ? com.google.spanner.admin.database.v1.Backup.getDefaultInstance() + : backup_; + } else { + return backupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+     * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + */ + public Builder setBackup(com.google.spanner.admin.database.v1.Backup value) { + if (backupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backup_ = value; + } else { + backupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+     * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + */ + public Builder setBackup(com.google.spanner.admin.database.v1.Backup.Builder builderForValue) { + if (backupBuilder_ == null) { + backup_ = builderForValue.build(); + } else { + backupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+     * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + */ + public Builder mergeBackup(com.google.spanner.admin.database.v1.Backup value) { + if (backupBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && backup_ != null + && backup_ != com.google.spanner.admin.database.v1.Backup.getDefaultInstance()) { + getBackupBuilder().mergeFrom(value); + } else { + backup_ = value; + } + } else { + backupBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+     * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + */ + public Builder clearBackup() { + bitField0_ = (bitField0_ & ~0x00000008); + backup_ = null; + if (backupBuilder_ != null) { + backupBuilder_.dispose(); + backupBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+     * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + */ + public com.google.spanner.admin.database.v1.Backup.Builder getBackupBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getBackupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+     * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + */ + public com.google.spanner.admin.database.v1.BackupOrBuilder getBackupOrBuilder() { + if (backupBuilder_ != null) { + return backupBuilder_.getMessageOrBuilder(); + } else { + return backup_ == null + ? com.google.spanner.admin.database.v1.Backup.getDefaultInstance() + : backup_; + } + } + /** + * + * + *
+     * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+     * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.Backup, + com.google.spanner.admin.database.v1.Backup.Builder, + com.google.spanner.admin.database.v1.BackupOrBuilder> + getBackupFieldBuilder() { + if (backupBuilder_ == null) { + backupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.Backup, + com.google.spanner.admin.database.v1.Backup.Builder, + com.google.spanner.admin.database.v1.BackupOrBuilder>( + getBackup(), getParentForChildren(), isClean()); + backup_ = null; + } + return backupBuilder_; + } + + @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.executor.v1.CloudBackupResponse) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.CloudBackupResponse) + private static final com.google.spanner.executor.v1.CloudBackupResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.CloudBackupResponse(); + } + + public static com.google.spanner.executor.v1.CloudBackupResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudBackupResponse 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.executor.v1.CloudBackupResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudBackupResponseOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudBackupResponseOrBuilder.java new file mode 100644 index 00000000000..c311139f028 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudBackupResponseOrBuilder.java @@ -0,0 +1,191 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface CloudBackupResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CloudBackupResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of backups returned by ListCloudBackupsAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + java.util.List getListedBackupsList(); + /** + * + * + *
+   * List of backups returned by ListCloudBackupsAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + com.google.spanner.admin.database.v1.Backup getListedBackups(int index); + /** + * + * + *
+   * List of backups returned by ListCloudBackupsAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + int getListedBackupsCount(); + /** + * + * + *
+   * List of backups returned by ListCloudBackupsAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + java.util.List + getListedBackupsOrBuilderList(); + /** + * + * + *
+   * List of backups returned by ListCloudBackupsAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Backup listed_backups = 1; + */ + com.google.spanner.admin.database.v1.BackupOrBuilder getListedBackupsOrBuilder(int index); + + /** + * + * + *
+   * List of operations returned by ListCloudBackupOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + java.util.List getListedBackupOperationsList(); + /** + * + * + *
+   * List of operations returned by ListCloudBackupOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + com.google.longrunning.Operation getListedBackupOperations(int index); + /** + * + * + *
+   * List of operations returned by ListCloudBackupOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + int getListedBackupOperationsCount(); + /** + * + * + *
+   * List of operations returned by ListCloudBackupOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + java.util.List + getListedBackupOperationsOrBuilderList(); + /** + * + * + *
+   * List of operations returned by ListCloudBackupOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_backup_operations = 2; + */ + com.google.longrunning.OperationOrBuilder getListedBackupOperationsOrBuilder(int index); + + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+   * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + * + * @return Whether the backup field is set. + */ + boolean hasBackup(); + /** + * + * + *
+   * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+   * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + * + * @return The backup. + */ + com.google.spanner.admin.database.v1.Backup getBackup(); + /** + * + * + *
+   * Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
+   * 
+ * + * .google.spanner.admin.database.v1.Backup backup = 4; + */ + com.google.spanner.admin.database.v1.BackupOrBuilder getBackupOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudDatabaseResponse.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudDatabaseResponse.java new file mode 100644 index 00000000000..c3032219788 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudDatabaseResponse.java @@ -0,0 +1,1900 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * CloudDatabaseResponse contains results returned by cloud database related
+ * actions.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CloudDatabaseResponse} + */ +public final class CloudDatabaseResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CloudDatabaseResponse) + CloudDatabaseResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudDatabaseResponse.newBuilder() to construct. + private CloudDatabaseResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudDatabaseResponse() { + listedDatabases_ = java.util.Collections.emptyList(); + listedDatabaseOperations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudDatabaseResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudDatabaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudDatabaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CloudDatabaseResponse.class, + com.google.spanner.executor.v1.CloudDatabaseResponse.Builder.class); + } + + public static final int LISTED_DATABASES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List listedDatabases_; + /** + * + * + *
+   * List of databases returned by ListCloudDatabasesAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + @java.lang.Override + public java.util.List getListedDatabasesList() { + return listedDatabases_; + } + /** + * + * + *
+   * List of databases returned by ListCloudDatabasesAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + @java.lang.Override + public java.util.List + getListedDatabasesOrBuilderList() { + return listedDatabases_; + } + /** + * + * + *
+   * List of databases returned by ListCloudDatabasesAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + @java.lang.Override + public int getListedDatabasesCount() { + return listedDatabases_.size(); + } + /** + * + * + *
+   * List of databases returned by ListCloudDatabasesAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.Database getListedDatabases(int index) { + return listedDatabases_.get(index); + } + /** + * + * + *
+   * List of databases returned by ListCloudDatabasesAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.DatabaseOrBuilder getListedDatabasesOrBuilder( + int index) { + return listedDatabases_.get(index); + } + + public static final int LISTED_DATABASE_OPERATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List listedDatabaseOperations_; + /** + * + * + *
+   * List of operations returned by ListCloudDatabaseOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + @java.lang.Override + public java.util.List getListedDatabaseOperationsList() { + return listedDatabaseOperations_; + } + /** + * + * + *
+   * List of operations returned by ListCloudDatabaseOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + @java.lang.Override + public java.util.List + getListedDatabaseOperationsOrBuilderList() { + return listedDatabaseOperations_; + } + /** + * + * + *
+   * List of operations returned by ListCloudDatabaseOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + @java.lang.Override + public int getListedDatabaseOperationsCount() { + return listedDatabaseOperations_.size(); + } + /** + * + * + *
+   * List of operations returned by ListCloudDatabaseOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + @java.lang.Override + public com.google.longrunning.Operation getListedDatabaseOperations(int index) { + return listedDatabaseOperations_.get(index); + } + /** + * + * + *
+   * List of operations returned by ListCloudDatabaseOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + @java.lang.Override + public com.google.longrunning.OperationOrBuilder getListedDatabaseOperationsOrBuilder(int index) { + return listedDatabaseOperations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_FIELD_NUMBER = 4; + private com.google.spanner.admin.database.v1.Database database_; + /** + * + * + *
+   * Database returned by GetCloudDatabaseAction
+   * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + * + * @return Whether the database field is set. + */ + @java.lang.Override + public boolean hasDatabase() { + return database_ != null; + } + /** + * + * + *
+   * Database returned by GetCloudDatabaseAction
+   * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + * + * @return The database. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.Database getDatabase() { + return database_ == null + ? com.google.spanner.admin.database.v1.Database.getDefaultInstance() + : database_; + } + /** + * + * + *
+   * Database returned by GetCloudDatabaseAction
+   * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.DatabaseOrBuilder getDatabaseOrBuilder() { + return database_ == null + ? com.google.spanner.admin.database.v1.Database.getDefaultInstance() + : database_; + } + + 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 < listedDatabases_.size(); i++) { + output.writeMessage(1, listedDatabases_.get(i)); + } + for (int i = 0; i < listedDatabaseOperations_.size(); i++) { + output.writeMessage(2, listedDatabaseOperations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); + } + if (database_ != null) { + output.writeMessage(4, getDatabase()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < listedDatabases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, listedDatabases_.get(i)); + } + for (int i = 0; i < listedDatabaseOperations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, listedDatabaseOperations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); + } + if (database_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDatabase()); + } + 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.executor.v1.CloudDatabaseResponse)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.CloudDatabaseResponse other = + (com.google.spanner.executor.v1.CloudDatabaseResponse) obj; + + if (!getListedDatabasesList().equals(other.getListedDatabasesList())) return false; + if (!getListedDatabaseOperationsList().equals(other.getListedDatabaseOperationsList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (hasDatabase() != other.hasDatabase()) return false; + if (hasDatabase()) { + if (!getDatabase().equals(other.getDatabase())) 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 (getListedDatabasesCount() > 0) { + hash = (37 * hash) + LISTED_DATABASES_FIELD_NUMBER; + hash = (53 * hash) + getListedDatabasesList().hashCode(); + } + if (getListedDatabaseOperationsCount() > 0) { + hash = (37 * hash) + LISTED_DATABASE_OPERATIONS_FIELD_NUMBER; + hash = (53 * hash) + getListedDatabaseOperationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (hasDatabase()) { + hash = (37 * hash) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.CloudDatabaseResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloudDatabaseResponse 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.executor.v1.CloudDatabaseResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloudDatabaseResponse 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.executor.v1.CloudDatabaseResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloudDatabaseResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.CloudDatabaseResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloudDatabaseResponse 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.executor.v1.CloudDatabaseResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloudDatabaseResponse 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.executor.v1.CloudDatabaseResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloudDatabaseResponse 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.executor.v1.CloudDatabaseResponse 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; + } + /** + * + * + *
+   * CloudDatabaseResponse contains results returned by cloud database related
+   * actions.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CloudDatabaseResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CloudDatabaseResponse) + com.google.spanner.executor.v1.CloudDatabaseResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudDatabaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudDatabaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CloudDatabaseResponse.class, + com.google.spanner.executor.v1.CloudDatabaseResponse.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.CloudDatabaseResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (listedDatabasesBuilder_ == null) { + listedDatabases_ = java.util.Collections.emptyList(); + } else { + listedDatabases_ = null; + listedDatabasesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (listedDatabaseOperationsBuilder_ == null) { + listedDatabaseOperations_ = java.util.Collections.emptyList(); + } else { + listedDatabaseOperations_ = null; + listedDatabaseOperationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + nextPageToken_ = ""; + database_ = null; + if (databaseBuilder_ != null) { + databaseBuilder_.dispose(); + databaseBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudDatabaseResponse_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloudDatabaseResponse getDefaultInstanceForType() { + return com.google.spanner.executor.v1.CloudDatabaseResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloudDatabaseResponse build() { + com.google.spanner.executor.v1.CloudDatabaseResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloudDatabaseResponse buildPartial() { + com.google.spanner.executor.v1.CloudDatabaseResponse result = + new com.google.spanner.executor.v1.CloudDatabaseResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.CloudDatabaseResponse result) { + if (listedDatabasesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + listedDatabases_ = java.util.Collections.unmodifiableList(listedDatabases_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.listedDatabases_ = listedDatabases_; + } else { + result.listedDatabases_ = listedDatabasesBuilder_.build(); + } + if (listedDatabaseOperationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + listedDatabaseOperations_ = + java.util.Collections.unmodifiableList(listedDatabaseOperations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.listedDatabaseOperations_ = listedDatabaseOperations_; + } else { + result.listedDatabaseOperations_ = listedDatabaseOperationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.CloudDatabaseResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.database_ = databaseBuilder_ == null ? database_ : databaseBuilder_.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.executor.v1.CloudDatabaseResponse) { + return mergeFrom((com.google.spanner.executor.v1.CloudDatabaseResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.CloudDatabaseResponse other) { + if (other == com.google.spanner.executor.v1.CloudDatabaseResponse.getDefaultInstance()) + return this; + if (listedDatabasesBuilder_ == null) { + if (!other.listedDatabases_.isEmpty()) { + if (listedDatabases_.isEmpty()) { + listedDatabases_ = other.listedDatabases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListedDatabasesIsMutable(); + listedDatabases_.addAll(other.listedDatabases_); + } + onChanged(); + } + } else { + if (!other.listedDatabases_.isEmpty()) { + if (listedDatabasesBuilder_.isEmpty()) { + listedDatabasesBuilder_.dispose(); + listedDatabasesBuilder_ = null; + listedDatabases_ = other.listedDatabases_; + bitField0_ = (bitField0_ & ~0x00000001); + listedDatabasesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getListedDatabasesFieldBuilder() + : null; + } else { + listedDatabasesBuilder_.addAllMessages(other.listedDatabases_); + } + } + } + if (listedDatabaseOperationsBuilder_ == null) { + if (!other.listedDatabaseOperations_.isEmpty()) { + if (listedDatabaseOperations_.isEmpty()) { + listedDatabaseOperations_ = other.listedDatabaseOperations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureListedDatabaseOperationsIsMutable(); + listedDatabaseOperations_.addAll(other.listedDatabaseOperations_); + } + onChanged(); + } + } else { + if (!other.listedDatabaseOperations_.isEmpty()) { + if (listedDatabaseOperationsBuilder_.isEmpty()) { + listedDatabaseOperationsBuilder_.dispose(); + listedDatabaseOperationsBuilder_ = null; + listedDatabaseOperations_ = other.listedDatabaseOperations_; + bitField0_ = (bitField0_ & ~0x00000002); + listedDatabaseOperationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getListedDatabaseOperationsFieldBuilder() + : null; + } else { + listedDatabaseOperationsBuilder_.addAllMessages(other.listedDatabaseOperations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasDatabase()) { + mergeDatabase(other.getDatabase()); + } + 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.admin.database.v1.Database m = + input.readMessage( + com.google.spanner.admin.database.v1.Database.parser(), extensionRegistry); + if (listedDatabasesBuilder_ == null) { + ensureListedDatabasesIsMutable(); + listedDatabases_.add(m); + } else { + listedDatabasesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.longrunning.Operation m = + input.readMessage(com.google.longrunning.Operation.parser(), extensionRegistry); + if (listedDatabaseOperationsBuilder_ == null) { + ensureListedDatabaseOperationsIsMutable(); + listedDatabaseOperations_.add(m); + } else { + listedDatabaseOperationsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getDatabaseFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + 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.util.List listedDatabases_ = + java.util.Collections.emptyList(); + + private void ensureListedDatabasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + listedDatabases_ = + new java.util.ArrayList( + listedDatabases_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.database.v1.Database, + com.google.spanner.admin.database.v1.Database.Builder, + com.google.spanner.admin.database.v1.DatabaseOrBuilder> + listedDatabasesBuilder_; + + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public java.util.List getListedDatabasesList() { + if (listedDatabasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(listedDatabases_); + } else { + return listedDatabasesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public int getListedDatabasesCount() { + if (listedDatabasesBuilder_ == null) { + return listedDatabases_.size(); + } else { + return listedDatabasesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public com.google.spanner.admin.database.v1.Database getListedDatabases(int index) { + if (listedDatabasesBuilder_ == null) { + return listedDatabases_.get(index); + } else { + return listedDatabasesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public Builder setListedDatabases( + int index, com.google.spanner.admin.database.v1.Database value) { + if (listedDatabasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedDatabasesIsMutable(); + listedDatabases_.set(index, value); + onChanged(); + } else { + listedDatabasesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public Builder setListedDatabases( + int index, com.google.spanner.admin.database.v1.Database.Builder builderForValue) { + if (listedDatabasesBuilder_ == null) { + ensureListedDatabasesIsMutable(); + listedDatabases_.set(index, builderForValue.build()); + onChanged(); + } else { + listedDatabasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public Builder addListedDatabases(com.google.spanner.admin.database.v1.Database value) { + if (listedDatabasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedDatabasesIsMutable(); + listedDatabases_.add(value); + onChanged(); + } else { + listedDatabasesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public Builder addListedDatabases( + int index, com.google.spanner.admin.database.v1.Database value) { + if (listedDatabasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedDatabasesIsMutable(); + listedDatabases_.add(index, value); + onChanged(); + } else { + listedDatabasesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public Builder addListedDatabases( + com.google.spanner.admin.database.v1.Database.Builder builderForValue) { + if (listedDatabasesBuilder_ == null) { + ensureListedDatabasesIsMutable(); + listedDatabases_.add(builderForValue.build()); + onChanged(); + } else { + listedDatabasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public Builder addListedDatabases( + int index, com.google.spanner.admin.database.v1.Database.Builder builderForValue) { + if (listedDatabasesBuilder_ == null) { + ensureListedDatabasesIsMutable(); + listedDatabases_.add(index, builderForValue.build()); + onChanged(); + } else { + listedDatabasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public Builder addAllListedDatabases( + java.lang.Iterable values) { + if (listedDatabasesBuilder_ == null) { + ensureListedDatabasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, listedDatabases_); + onChanged(); + } else { + listedDatabasesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public Builder clearListedDatabases() { + if (listedDatabasesBuilder_ == null) { + listedDatabases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listedDatabasesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public Builder removeListedDatabases(int index) { + if (listedDatabasesBuilder_ == null) { + ensureListedDatabasesIsMutable(); + listedDatabases_.remove(index); + onChanged(); + } else { + listedDatabasesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public com.google.spanner.admin.database.v1.Database.Builder getListedDatabasesBuilder( + int index) { + return getListedDatabasesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public com.google.spanner.admin.database.v1.DatabaseOrBuilder getListedDatabasesOrBuilder( + int index) { + if (listedDatabasesBuilder_ == null) { + return listedDatabases_.get(index); + } else { + return listedDatabasesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public java.util.List + getListedDatabasesOrBuilderList() { + if (listedDatabasesBuilder_ != null) { + return listedDatabasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(listedDatabases_); + } + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public com.google.spanner.admin.database.v1.Database.Builder addListedDatabasesBuilder() { + return getListedDatabasesFieldBuilder() + .addBuilder(com.google.spanner.admin.database.v1.Database.getDefaultInstance()); + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public com.google.spanner.admin.database.v1.Database.Builder addListedDatabasesBuilder( + int index) { + return getListedDatabasesFieldBuilder() + .addBuilder(index, com.google.spanner.admin.database.v1.Database.getDefaultInstance()); + } + /** + * + * + *
+     * List of databases returned by ListCloudDatabasesAction.
+     * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + public java.util.List + getListedDatabasesBuilderList() { + return getListedDatabasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.database.v1.Database, + com.google.spanner.admin.database.v1.Database.Builder, + com.google.spanner.admin.database.v1.DatabaseOrBuilder> + getListedDatabasesFieldBuilder() { + if (listedDatabasesBuilder_ == null) { + listedDatabasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.database.v1.Database, + com.google.spanner.admin.database.v1.Database.Builder, + com.google.spanner.admin.database.v1.DatabaseOrBuilder>( + listedDatabases_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + listedDatabases_ = null; + } + return listedDatabasesBuilder_; + } + + private java.util.List listedDatabaseOperations_ = + java.util.Collections.emptyList(); + + private void ensureListedDatabaseOperationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + listedDatabaseOperations_ = + new java.util.ArrayList(listedDatabaseOperations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder> + listedDatabaseOperationsBuilder_; + + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public java.util.List getListedDatabaseOperationsList() { + if (listedDatabaseOperationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(listedDatabaseOperations_); + } else { + return listedDatabaseOperationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public int getListedDatabaseOperationsCount() { + if (listedDatabaseOperationsBuilder_ == null) { + return listedDatabaseOperations_.size(); + } else { + return listedDatabaseOperationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public com.google.longrunning.Operation getListedDatabaseOperations(int index) { + if (listedDatabaseOperationsBuilder_ == null) { + return listedDatabaseOperations_.get(index); + } else { + return listedDatabaseOperationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public Builder setListedDatabaseOperations(int index, com.google.longrunning.Operation value) { + if (listedDatabaseOperationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedDatabaseOperationsIsMutable(); + listedDatabaseOperations_.set(index, value); + onChanged(); + } else { + listedDatabaseOperationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public Builder setListedDatabaseOperations( + int index, com.google.longrunning.Operation.Builder builderForValue) { + if (listedDatabaseOperationsBuilder_ == null) { + ensureListedDatabaseOperationsIsMutable(); + listedDatabaseOperations_.set(index, builderForValue.build()); + onChanged(); + } else { + listedDatabaseOperationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public Builder addListedDatabaseOperations(com.google.longrunning.Operation value) { + if (listedDatabaseOperationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedDatabaseOperationsIsMutable(); + listedDatabaseOperations_.add(value); + onChanged(); + } else { + listedDatabaseOperationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public Builder addListedDatabaseOperations(int index, com.google.longrunning.Operation value) { + if (listedDatabaseOperationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedDatabaseOperationsIsMutable(); + listedDatabaseOperations_.add(index, value); + onChanged(); + } else { + listedDatabaseOperationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public Builder addListedDatabaseOperations( + com.google.longrunning.Operation.Builder builderForValue) { + if (listedDatabaseOperationsBuilder_ == null) { + ensureListedDatabaseOperationsIsMutable(); + listedDatabaseOperations_.add(builderForValue.build()); + onChanged(); + } else { + listedDatabaseOperationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public Builder addListedDatabaseOperations( + int index, com.google.longrunning.Operation.Builder builderForValue) { + if (listedDatabaseOperationsBuilder_ == null) { + ensureListedDatabaseOperationsIsMutable(); + listedDatabaseOperations_.add(index, builderForValue.build()); + onChanged(); + } else { + listedDatabaseOperationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public Builder addAllListedDatabaseOperations( + java.lang.Iterable values) { + if (listedDatabaseOperationsBuilder_ == null) { + ensureListedDatabaseOperationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, listedDatabaseOperations_); + onChanged(); + } else { + listedDatabaseOperationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public Builder clearListedDatabaseOperations() { + if (listedDatabaseOperationsBuilder_ == null) { + listedDatabaseOperations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + listedDatabaseOperationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public Builder removeListedDatabaseOperations(int index) { + if (listedDatabaseOperationsBuilder_ == null) { + ensureListedDatabaseOperationsIsMutable(); + listedDatabaseOperations_.remove(index); + onChanged(); + } else { + listedDatabaseOperationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public com.google.longrunning.Operation.Builder getListedDatabaseOperationsBuilder(int index) { + return getListedDatabaseOperationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public com.google.longrunning.OperationOrBuilder getListedDatabaseOperationsOrBuilder( + int index) { + if (listedDatabaseOperationsBuilder_ == null) { + return listedDatabaseOperations_.get(index); + } else { + return listedDatabaseOperationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public java.util.List + getListedDatabaseOperationsOrBuilderList() { + if (listedDatabaseOperationsBuilder_ != null) { + return listedDatabaseOperationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(listedDatabaseOperations_); + } + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public com.google.longrunning.Operation.Builder addListedDatabaseOperationsBuilder() { + return getListedDatabaseOperationsFieldBuilder() + .addBuilder(com.google.longrunning.Operation.getDefaultInstance()); + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public com.google.longrunning.Operation.Builder addListedDatabaseOperationsBuilder(int index) { + return getListedDatabaseOperationsFieldBuilder() + .addBuilder(index, com.google.longrunning.Operation.getDefaultInstance()); + } + /** + * + * + *
+     * List of operations returned by ListCloudDatabaseOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + public java.util.List + getListedDatabaseOperationsBuilderList() { + return getListedDatabaseOperationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder> + getListedDatabaseOperationsFieldBuilder() { + if (listedDatabaseOperationsBuilder_ == null) { + listedDatabaseOperationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder>( + listedDatabaseOperations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + listedDatabaseOperations_ = null; + } + return listedDatabaseOperationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 3; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 3; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.spanner.admin.database.v1.Database database_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.Database, + com.google.spanner.admin.database.v1.Database.Builder, + com.google.spanner.admin.database.v1.DatabaseOrBuilder> + databaseBuilder_; + /** + * + * + *
+     * Database returned by GetCloudDatabaseAction
+     * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + * + * @return Whether the database field is set. + */ + public boolean hasDatabase() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Database returned by GetCloudDatabaseAction
+     * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + * + * @return The database. + */ + public com.google.spanner.admin.database.v1.Database getDatabase() { + if (databaseBuilder_ == null) { + return database_ == null + ? com.google.spanner.admin.database.v1.Database.getDefaultInstance() + : database_; + } else { + return databaseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Database returned by GetCloudDatabaseAction
+     * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + */ + public Builder setDatabase(com.google.spanner.admin.database.v1.Database value) { + if (databaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + database_ = value; + } else { + databaseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Database returned by GetCloudDatabaseAction
+     * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + */ + public Builder setDatabase( + com.google.spanner.admin.database.v1.Database.Builder builderForValue) { + if (databaseBuilder_ == null) { + database_ = builderForValue.build(); + } else { + databaseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Database returned by GetCloudDatabaseAction
+     * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + */ + public Builder mergeDatabase(com.google.spanner.admin.database.v1.Database value) { + if (databaseBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && database_ != null + && database_ != com.google.spanner.admin.database.v1.Database.getDefaultInstance()) { + getDatabaseBuilder().mergeFrom(value); + } else { + database_ = value; + } + } else { + databaseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Database returned by GetCloudDatabaseAction
+     * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + */ + public Builder clearDatabase() { + bitField0_ = (bitField0_ & ~0x00000008); + database_ = null; + if (databaseBuilder_ != null) { + databaseBuilder_.dispose(); + databaseBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Database returned by GetCloudDatabaseAction
+     * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + */ + public com.google.spanner.admin.database.v1.Database.Builder getDatabaseBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDatabaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Database returned by GetCloudDatabaseAction
+     * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + */ + public com.google.spanner.admin.database.v1.DatabaseOrBuilder getDatabaseOrBuilder() { + if (databaseBuilder_ != null) { + return databaseBuilder_.getMessageOrBuilder(); + } else { + return database_ == null + ? com.google.spanner.admin.database.v1.Database.getDefaultInstance() + : database_; + } + } + /** + * + * + *
+     * Database returned by GetCloudDatabaseAction
+     * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.Database, + com.google.spanner.admin.database.v1.Database.Builder, + com.google.spanner.admin.database.v1.DatabaseOrBuilder> + getDatabaseFieldBuilder() { + if (databaseBuilder_ == null) { + databaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.Database, + com.google.spanner.admin.database.v1.Database.Builder, + com.google.spanner.admin.database.v1.DatabaseOrBuilder>( + getDatabase(), getParentForChildren(), isClean()); + database_ = null; + } + return databaseBuilder_; + } + + @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.executor.v1.CloudDatabaseResponse) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.CloudDatabaseResponse) + private static final com.google.spanner.executor.v1.CloudDatabaseResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.CloudDatabaseResponse(); + } + + public static com.google.spanner.executor.v1.CloudDatabaseResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudDatabaseResponse 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.executor.v1.CloudDatabaseResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudDatabaseResponseOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudDatabaseResponseOrBuilder.java new file mode 100644 index 00000000000..bca2dfd5276 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudDatabaseResponseOrBuilder.java @@ -0,0 +1,191 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface CloudDatabaseResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CloudDatabaseResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of databases returned by ListCloudDatabasesAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + java.util.List getListedDatabasesList(); + /** + * + * + *
+   * List of databases returned by ListCloudDatabasesAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + com.google.spanner.admin.database.v1.Database getListedDatabases(int index); + /** + * + * + *
+   * List of databases returned by ListCloudDatabasesAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + int getListedDatabasesCount(); + /** + * + * + *
+   * List of databases returned by ListCloudDatabasesAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + java.util.List + getListedDatabasesOrBuilderList(); + /** + * + * + *
+   * List of databases returned by ListCloudDatabasesAction.
+   * 
+ * + * repeated .google.spanner.admin.database.v1.Database listed_databases = 1; + */ + com.google.spanner.admin.database.v1.DatabaseOrBuilder getListedDatabasesOrBuilder(int index); + + /** + * + * + *
+   * List of operations returned by ListCloudDatabaseOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + java.util.List getListedDatabaseOperationsList(); + /** + * + * + *
+   * List of operations returned by ListCloudDatabaseOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + com.google.longrunning.Operation getListedDatabaseOperations(int index); + /** + * + * + *
+   * List of operations returned by ListCloudDatabaseOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + int getListedDatabaseOperationsCount(); + /** + * + * + *
+   * List of operations returned by ListCloudDatabaseOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + java.util.List + getListedDatabaseOperationsOrBuilderList(); + /** + * + * + *
+   * List of operations returned by ListCloudDatabaseOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_database_operations = 2; + */ + com.google.longrunning.OperationOrBuilder getListedDatabaseOperationsOrBuilder(int index); + + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Database returned by GetCloudDatabaseAction
+   * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + * + * @return Whether the database field is set. + */ + boolean hasDatabase(); + /** + * + * + *
+   * Database returned by GetCloudDatabaseAction
+   * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + * + * @return The database. + */ + com.google.spanner.admin.database.v1.Database getDatabase(); + /** + * + * + *
+   * Database returned by GetCloudDatabaseAction
+   * 
+ * + * .google.spanner.admin.database.v1.Database database = 4; + */ + com.google.spanner.admin.database.v1.DatabaseOrBuilder getDatabaseOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudExecutorProto.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudExecutorProto.java new file mode 100644 index 00000000000..b7d00e38d0f --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudExecutorProto.java @@ -0,0 +1,1665 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public final class CloudExecutorProto { + private CloudExecutorProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_SpannerAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_SpannerAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ReadAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ReadAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_QueryAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_QueryAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_QueryAction_Parameter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_QueryAction_Parameter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_DmlAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_DmlAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_BatchDmlAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_BatchDmlAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_Value_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_Value_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_KeyRange_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_KeyRange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_KeySet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_KeySet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ValueList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ValueList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_MutationAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_MutationAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_MutationAction_Mod_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_MutationAction_Mod_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_WriteMutationsAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_WriteMutationsAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_PartitionedUpdateAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_PartitionedUpdateAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_StartTransactionAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_StartTransactionAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_Concurrency_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_Concurrency_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_TableMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_TableMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ColumnMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ColumnMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_TransactionExecutionOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_TransactionExecutionOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_FinishTransactionAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_FinishTransactionAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_AdminAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_AdminAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ListCloudInstancesAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ListCloudInstancesAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_GetCloudInstanceAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_GetCloudInstanceAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_CreateCloudBackupAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_CreateCloudBackupAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_CopyCloudBackupAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_CopyCloudBackupAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_GetCloudBackupAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_GetCloudBackupAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ListCloudBackupsAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ListCloudBackupsAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_GetOperationAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_GetOperationAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_CancelOperationAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_CancelOperationAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_StartBatchTransactionAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_StartBatchTransactionAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_BatchPartition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_BatchPartition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ExecutePartitionAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ExecutePartitionAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_SpannerActionOutcome_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_SpannerActionOutcome_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_AdminResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_AdminResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_CloudBackupResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_CloudBackupResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_OperationResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_OperationResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_CloudInstanceResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_CloudInstanceResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_CloudDatabaseResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_CloudDatabaseResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ReadResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ReadResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_QueryResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_QueryResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ChangeStreamRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ChangeStreamRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_DataChangeRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_DataChangeRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ChildPartitionsRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ChildPartitionsRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_executor_v1_HeartbeatRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_executor_v1_HeartbeatRecord_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/spanner/executor/v1/cloud_execu" + + "tor.proto\022\032google.spanner.executor.v1\032\027g" + + "oogle/api/client.proto\032\037google/api/field" + + "_behavior.proto\032#google/longrunning/oper" + + "ations.proto\032\037google/protobuf/timestamp." + + "proto\032\027google/rpc/status.proto\032-google/s" + + "panner/admin/database/v1/backup.proto\032-g" + + "oogle/spanner/admin/database/v1/common.p" + + "roto\032=google/spanner/admin/database/v1/s" + + "panner_database_admin.proto\032=google/span" + + "ner/admin/instance/v1/spanner_instance_a" + + "dmin.proto\032\037google/spanner/v1/spanner.pr" + + "oto\032\034google/spanner/v1/type.proto\"i\n\031Spa" + + "nnerAsyncActionRequest\022\021\n\taction_id\030\001 \001(" + + "\005\0229\n\006action\030\002 \001(\0132).google.spanner.execu" + + "tor.v1.SpannerAction\"r\n\032SpannerAsyncActi" + + "onResponse\022\021\n\taction_id\030\001 \001(\005\022A\n\007outcome" + + "\030\002 \001(\01320.google.spanner.executor.v1.Span" + + "nerActionOutcome\"\331\t\n\rSpannerAction\022\025\n\rda" + + "tabase_path\030\001 \001(\t\022C\n\005start\030\n \001(\01322.googl" + + "e.spanner.executor.v1.StartTransactionAc" + + "tionH\000\022E\n\006finish\030\013 \001(\01323.google.spanner." + + "executor.v1.FinishTransactionActionH\000\0226\n" + + "\004read\030\024 \001(\0132&.google.spanner.executor.v1" + + ".ReadActionH\000\0228\n\005query\030\025 \001(\0132\'.google.sp" + + "anner.executor.v1.QueryActionH\000\022>\n\010mutat" + + "ion\030\026 \001(\0132*.google.spanner.executor.v1.M" + + "utationActionH\000\0224\n\003dml\030\027 \001(\0132%.google.sp" + + "anner.executor.v1.DmlActionH\000\022?\n\tbatch_d" + + "ml\030\030 \001(\0132*.google.spanner.executor.v1.Ba" + + "tchDmlActionH\000\022A\n\005write\030\031 \001(\01320.google.s" + + "panner.executor.v1.WriteMutationsActionH" + + "\000\022Q\n\022partitioned_update\030\033 \001(\01323.google.s" + + "panner.executor.v1.PartitionedUpdateActi" + + "onH\000\0228\n\005admin\030\036 \001(\0132\'.google.spanner.exe" + + "cutor.v1.AdminActionH\000\022R\n\017start_batch_tx" + + "n\030( \001(\01327.google.spanner.executor.v1.Sta" + + "rtBatchTransactionActionH\000\022R\n\017close_batc" + + "h_txn\030) \001(\01327.google.spanner.executor.v1" + + ".CloseBatchTransactionActionH\000\022d\n\033genera" + + "te_db_partitions_read\030* \001(\0132=.google.spa" + + "nner.executor.v1.GenerateDbPartitionsFor" + + "ReadActionH\000\022f\n\034generate_db_partitions_q" + + "uery\030+ \001(\0132>.google.spanner.executor.v1." + + "GenerateDbPartitionsForQueryActionH\000\022O\n\021" + + "execute_partition\030, \001(\01322.google.spanner" + + ".executor.v1.ExecutePartitionActionH\000\022[\n" + + "\033execute_change_stream_query\0302 \001(\01324.goo" + + "gle.spanner.executor.v1.ExecuteChangeStr" + + "eamQueryH\000B\010\n\006action\"\212\001\n\nReadAction\022\r\n\005t" + + "able\030\001 \001(\t\022\022\n\005index\030\002 \001(\tH\000\210\001\001\022\016\n\006column" + + "\030\003 \003(\t\0220\n\004keys\030\004 \001(\0132\".google.spanner.ex" + + "ecutor.v1.KeySet\022\r\n\005limit\030\005 \001(\005B\010\n\006_inde" + + "x\"\321\001\n\013QueryAction\022\013\n\003sql\030\001 \001(\t\022A\n\006params" + + "\030\002 \003(\01321.google.spanner.executor.v1.Quer" + + "yAction.Parameter\032r\n\tParameter\022\014\n\004name\030\001" + + " \001(\t\022%\n\004type\030\002 \001(\0132\027.google.spanner.v1.T" + + "ype\0220\n\005value\030\003 \001(\0132!.google.spanner.exec" + + "utor.v1.Value\"\206\001\n\tDmlAction\0227\n\006update\030\001 " + + "\001(\0132\'.google.spanner.executor.v1.QueryAc" + + "tion\022$\n\027autocommit_if_supported\030\002 \001(\010H\000\210" + + "\001\001B\032\n\030_autocommit_if_supported\"J\n\016BatchD" + + "mlAction\0228\n\007updates\030\001 \003(\0132\'.google.spann" + + "er.executor.v1.QueryAction\"\311\003\n\005Value\022\021\n\007" + + "is_null\030\001 \001(\010H\000\022\023\n\tint_value\030\002 \001(\003H\000\022\024\n\n" + + "bool_value\030\003 \001(\010H\000\022\026\n\014double_value\030\004 \001(\001" + + "H\000\022\025\n\013bytes_value\030\005 \001(\014H\000\022\026\n\014string_valu" + + "e\030\006 \001(\tH\000\022=\n\014struct_value\030\007 \001(\0132%.google" + + ".spanner.executor.v1.ValueListH\000\0225\n\017time" + + "stamp_value\030\010 \001(\0132\032.google.protobuf.Time" + + "stampH\000\022\031\n\017date_days_value\030\t \001(\005H\000\022\035\n\023is" + + "_commit_timestamp\030\n \001(\010H\000\022<\n\013array_value" + + "\030\013 \001(\0132%.google.spanner.executor.v1.Valu" + + "eListH\000\0220\n\narray_type\030\014 \001(\0132\027.google.spa" + + "nner.v1.TypeH\001\210\001\001B\014\n\nvalue_typeB\r\n\013_arra" + + "y_type\"\237\002\n\010KeyRange\0224\n\005start\030\001 \001(\0132%.goo" + + "gle.spanner.executor.v1.ValueList\0224\n\005lim" + + "it\030\002 \001(\0132%.google.spanner.executor.v1.Va" + + "lueList\022<\n\004type\030\003 \001(\0162).google.spanner.e" + + "xecutor.v1.KeyRange.TypeH\000\210\001\001\"`\n\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\021\n\rCLOSED_CLOSED\020\001\022\017" + + "\n\013CLOSED_OPEN\020\002\022\017\n\013OPEN_CLOSED\020\003\022\r\n\tOPEN" + + "_OPEN\020\004B\007\n\005_type\"\200\001\n\006KeySet\0224\n\005point\030\001 \003" + + "(\0132%.google.spanner.executor.v1.ValueLis" + + "t\0223\n\005range\030\002 \003(\0132$.google.spanner.execut" + + "or.v1.KeyRange\022\013\n\003all\030\003 \001(\010\"=\n\tValueList" + + "\0220\n\005value\030\001 \003(\0132!.google.spanner.executo" + + "r.v1.Value\"\274\005\n\016MutationAction\022;\n\003mod\030\001 \003" + + "(\0132..google.spanner.executor.v1.Mutation" + + "Action.Mod\032z\n\nInsertArgs\022\016\n\006column\030\001 \003(\t" + + "\022%\n\004type\030\002 \003(\0132\027.google.spanner.v1.Type\022" + + "5\n\006values\030\003 \003(\0132%.google.spanner.executo" + + "r.v1.ValueList\032z\n\nUpdateArgs\022\016\n\006column\030\001" + + " \003(\t\022%\n\004type\030\002 \003(\0132\027.google.spanner.v1.T" + + "ype\0225\n\006values\030\003 \003(\0132%.google.spanner.exe" + + "cutor.v1.ValueList\032\364\002\n\003Mod\022\r\n\005table\030\001 \001(" + + "\t\022E\n\006insert\030\002 \001(\01325.google.spanner.execu" + + "tor.v1.MutationAction.InsertArgs\022E\n\006upda" + + "te\030\003 \001(\01325.google.spanner.executor.v1.Mu" + + "tationAction.UpdateArgs\022O\n\020insert_or_upd" + + "ate\030\004 \001(\01325.google.spanner.executor.v1.M" + + "utationAction.InsertArgs\022F\n\007replace\030\005 \001(" + + "\01325.google.spanner.executor.v1.MutationA" + + "ction.InsertArgs\0227\n\013delete_keys\030\006 \001(\0132\"." + + "google.spanner.executor.v1.KeySet\"T\n\024Wri" + + "teMutationsAction\022<\n\010mutation\030\001 \001(\0132*.go" + + "ogle.spanner.executor.v1.MutationAction\"" + + "\337\002\n\027PartitionedUpdateAction\022i\n\007options\030\001" + + " \001(\0132S.google.spanner.executor.v1.Partit" + + "ionedUpdateAction.ExecutePartitionedUpda" + + "teOptionsH\000\210\001\001\0227\n\006update\030\002 \001(\0132\'.google." + + "spanner.executor.v1.QueryAction\032\223\001\n\037Exec" + + "utePartitionedUpdateOptions\022E\n\014rpc_prior" + + "ity\030\001 \001(\0162*.google.spanner.v1.RequestOpt" + + "ions.PriorityH\000\210\001\001\022\020\n\003tag\030\002 \001(\tH\001\210\001\001B\017\n\r" + + "_rpc_priorityB\006\n\004_tagB\n\n\010_options\"\256\002\n\026St" + + "artTransactionAction\022A\n\013concurrency\030\001 \001(" + + "\0132\'.google.spanner.executor.v1.Concurren" + + "cyH\000\210\001\001\0228\n\005table\030\002 \003(\0132).google.spanner." + + "executor.v1.TableMetadata\022\030\n\020transaction" + + "_seed\030\003 \001(\t\022W\n\021execution_options\030\004 \001(\01327" + + ".google.spanner.executor.v1.TransactionE" + + "xecutionOptionsH\001\210\001\001B\016\n\014_concurrencyB\024\n\022" + + "_execution_options\"\256\002\n\013Concurrency\022\033\n\021st" + + "aleness_seconds\030\001 \001(\001H\000\022#\n\031min_read_time" + + "stamp_micros\030\002 \001(\003H\000\022\037\n\025max_staleness_se" + + "conds\030\003 \001(\001H\000\022 \n\026exact_timestamp_micros\030" + + "\004 \001(\003H\000\022\020\n\006strong\030\005 \001(\010H\000\022\017\n\005batch\030\006 \001(\010" + + "H\000\022\033\n\023snapshot_epoch_read\030\007 \001(\010\022!\n\031snaps" + + "hot_epoch_root_table\030\010 \001(\t\022#\n\033batch_read" + + "_timestamp_micros\030\t \001(\003B\022\n\020concurrency_m" + + "ode\"\231\001\n\rTableMetadata\022\014\n\004name\030\001 \001(\t\022:\n\006c" + + "olumn\030\002 \003(\0132*.google.spanner.executor.v1" + + ".ColumnMetadata\022>\n\nkey_column\030\003 \003(\0132*.go" + + "ogle.spanner.executor.v1.ColumnMetadata\"" + + "E\n\016ColumnMetadata\022\014\n\004name\030\001 \001(\t\022%\n\004type\030" + + "\002 \001(\0132\027.google.spanner.v1.Type\"1\n\033Transa" + + "ctionExecutionOptions\022\022\n\noptimistic\030\001 \001(" + + "\010\"\230\001\n\027FinishTransactionAction\022F\n\004mode\030\001 " + + "\001(\01628.google.spanner.executor.v1.FinishT" + + "ransactionAction.Mode\"5\n\004Mode\022\024\n\020MODE_UN" + + "SPECIFIED\020\000\022\n\n\006COMMIT\020\001\022\013\n\007ABANDON\020\002\"\305\023\n" + + "\013AdminAction\022a\n\033create_user_instance_con" + + "fig\030\001 \001(\0132:.google.spanner.executor.v1.C" + + "reateUserInstanceConfigActionH\000\022a\n\033updat" + + "e_user_instance_config\030\002 \001(\0132:.google.sp" + + "anner.executor.v1.UpdateUserInstanceConf" + + "igActionH\000\022a\n\033delete_user_instance_confi" + + "g\030\003 \001(\0132:.google.spanner.executor.v1.Del" + + "eteUserInstanceConfigActionH\000\022]\n\031get_clo" + + "ud_instance_config\030\004 \001(\01328.google.spanne" + + "r.executor.v1.GetCloudInstanceConfigActi" + + "onH\000\022[\n\025list_instance_configs\030\005 \001(\0132:.go" + + "ogle.spanner.executor.v1.ListCloudInstan" + + "ceConfigsActionH\000\022V\n\025create_cloud_instan" + + "ce\030\006 \001(\01325.google.spanner.executor.v1.Cr" + + "eateCloudInstanceActionH\000\022V\n\025update_clou" + + "d_instance\030\007 \001(\01325.google.spanner.execut" + + "or.v1.UpdateCloudInstanceActionH\000\022V\n\025del" + + "ete_cloud_instance\030\010 \001(\01325.google.spanne" + + "r.executor.v1.DeleteCloudInstanceActionH" + + "\000\022T\n\024list_cloud_instances\030\t \001(\01324.google" + + ".spanner.executor.v1.ListCloudInstancesA" + + "ctionH\000\022P\n\022get_cloud_instance\030\n \001(\01322.go" + + "ogle.spanner.executor.v1.GetCloudInstanc" + + "eActionH\000\022V\n\025create_cloud_database\030\013 \001(\013" + + "25.google.spanner.executor.v1.CreateClou" + + "dDatabaseActionH\000\022]\n\031update_cloud_databa" + + "se_ddl\030\014 \001(\01328.google.spanner.executor.v" + + "1.UpdateCloudDatabaseDdlActionH\000\022V\n\025upda" + + "te_cloud_database\030\033 \001(\01325.google.spanner" + + ".executor.v1.UpdateCloudDatabaseActionH\000" + + "\022R\n\023drop_cloud_database\030\r \001(\01323.google.s" + + "panner.executor.v1.DropCloudDatabaseActi" + + "onH\000\022T\n\024list_cloud_databases\030\016 \001(\01324.goo" + + "gle.spanner.executor.v1.ListCloudDatabas" + + "esActionH\000\022g\n\036list_cloud_database_operat" + + "ions\030\017 \001(\0132=.google.spanner.executor.v1." + + "ListCloudDatabaseOperationsActionH\000\022X\n\026r" + + "estore_cloud_database\030\020 \001(\01326.google.spa" + + "nner.executor.v1.RestoreCloudDatabaseAct" + + "ionH\000\022P\n\022get_cloud_database\030\021 \001(\01322.goog" + + "le.spanner.executor.v1.GetCloudDatabaseA" + + "ctionH\000\022R\n\023create_cloud_backup\030\022 \001(\01323.g" + + "oogle.spanner.executor.v1.CreateCloudBac" + + "kupActionH\000\022N\n\021copy_cloud_backup\030\023 \001(\01321" + + ".google.spanner.executor.v1.CopyCloudBac" + + "kupActionH\000\022L\n\020get_cloud_backup\030\024 \001(\01320." + + "google.spanner.executor.v1.GetCloudBacku" + + "pActionH\000\022R\n\023update_cloud_backup\030\025 \001(\01323" + + ".google.spanner.executor.v1.UpdateCloudB" + + "ackupActionH\000\022R\n\023delete_cloud_backup\030\026 \001" + + "(\01323.google.spanner.executor.v1.DeleteCl" + + "oudBackupActionH\000\022P\n\022list_cloud_backups\030" + + "\027 \001(\01322.google.spanner.executor.v1.ListC" + + "loudBackupsActionH\000\022c\n\034list_cloud_backup" + + "_operations\030\030 \001(\0132;.google.spanner.execu" + + "tor.v1.ListCloudBackupOperationsActionH\000" + + "\022G\n\rget_operation\030\031 \001(\0132..google.spanner" + + ".executor.v1.GetOperationActionH\000\022M\n\020can" + + "cel_operation\030\032 \001(\01321.google.spanner.exe" + + "cutor.v1.CancelOperationActionH\000\022`\n\032reco" + + "nfigure_cloud_database\030\034 \001(\0132:.google.sp" + + "anner.executor.v1.ReconfigureCloudDataba" + + "seActionH\000B\010\n\006action\"\245\001\n\036CreateUserInsta" + + "nceConfigAction\022\026\n\016user_config_id\030\001 \001(\t\022" + + "\022\n\nproject_id\030\002 \001(\t\022\026\n\016base_config_id\030\003 " + + "\001(\t\022?\n\010replicas\030\004 \003(\0132-.google.spanner.a" + + "dmin.instance.v1.ReplicaInfo\"\377\001\n\036UpdateU" + + "serInstanceConfigAction\022\026\n\016user_config_i" + + "d\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\031\n\014display_n" + + "ame\030\003 \001(\tH\000\210\001\001\022V\n\006labels\030\004 \003(\0132F.google." + + "spanner.executor.v1.UpdateUserInstanceCo" + + "nfigAction.LabelsEntry\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\r_displa" + + "y_name\"N\n\034GetCloudInstanceConfigAction\022\032" + + "\n\022instance_config_id\030\001 \001(\t\022\022\n\nproject_id" + + "\030\002 \001(\t\"L\n\036DeleteUserInstanceConfigAction" + + "\022\026\n\016user_config_id\030\001 \001(\t\022\022\n\nproject_id\030\002" + + " \001(\t\"\202\001\n\036ListCloudInstanceConfigsAction\022" + + "\022\n\nproject_id\030\001 \001(\t\022\026\n\tpage_size\030\002 \001(\005H\000" + + "\210\001\001\022\027\n\npage_token\030\003 \001(\tH\001\210\001\001B\014\n\n_page_si" + + "zeB\r\n\013_page_token\"\253\003\n\031CreateCloudInstanc" + + "eAction\022\023\n\013instance_id\030\001 \001(\t\022\022\n\nproject_" + + "id\030\002 \001(\t\022\032\n\022instance_config_id\030\003 \001(\t\022\027\n\n" + + "node_count\030\004 \001(\005H\000\210\001\001\022\035\n\020processing_unit" + + "s\030\006 \001(\005H\001\210\001\001\022T\n\022autoscaling_config\030\007 \001(\013" + + "23.google.spanner.admin.instance.v1.Auto" + + "scalingConfigH\002\210\001\001\022Q\n\006labels\030\005 \003(\0132A.goo" + + "gle.spanner.executor.v1.CreateCloudInsta" + + "nceAction.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\r\n\013_node_co" + + "untB\023\n\021_processing_unitsB\025\n\023_autoscaling" + + "_config\"\273\003\n\031UpdateCloudInstanceAction\022\023\n" + + "\013instance_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\031" + + "\n\014display_name\030\003 \001(\tH\000\210\001\001\022\027\n\nnode_count\030" + + "\004 \001(\005H\001\210\001\001\022\035\n\020processing_units\030\005 \001(\005H\002\210\001" + + "\001\022T\n\022autoscaling_config\030\007 \001(\01323.google.s" + + "panner.admin.instance.v1.AutoscalingConf" + + "igH\003\210\001\001\022Q\n\006labels\030\006 \003(\0132A.google.spanner" + + ".executor.v1.UpdateCloudInstanceAction.L" + + "abelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001B\017\n\r_display_nameB\r\n\013_n" + + "ode_countB\023\n\021_processing_unitsB\025\n\023_autos" + + "caling_config\"D\n\031DeleteCloudInstanceActi" + + "on\022\023\n\013instance_id\030\001 \001(\t\022\022\n\nproject_id\030\002 " + + "\001(\t\"\227\002\n\031CreateCloudDatabaseAction\022\023\n\013ins" + + "tance_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\023\n\013da" + + "tabase_id\030\003 \001(\t\022\025\n\rsdl_statement\030\004 \003(\t\022M" + + "\n\021encryption_config\030\005 \001(\01322.google.spann" + + "er.admin.database.v1.EncryptionConfig\022\024\n" + + "\007dialect\030\006 \001(\tH\000\210\001\001\022\036\n\021proto_descriptors" + + "\030\007 \001(\014H\001\210\001\001B\n\n\010_dialectB\024\n\022_proto_descri" + + "ptors\"\277\001\n\034UpdateCloudDatabaseDdlAction\022\023" + + "\n\013instance_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022" + + "\023\n\013database_id\030\003 \001(\t\022\025\n\rsdl_statement\030\004 " + + "\003(\t\022\024\n\014operation_id\030\005 \001(\t\022\036\n\021proto_descr" + + "iptors\030\006 \001(\014H\000\210\001\001B\024\n\022_proto_descriptors\"" + + "{\n\031UpdateCloudDatabaseAction\022\023\n\013instance" + + "_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\025\n\rdatabas" + + "e_name\030\003 \001(\t\022\036\n\026enable_drop_protection\030\004" + + " \001(\010\"W\n\027DropCloudDatabaseAction\022\023\n\013insta" + + "nce_id\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\023\n\013data" + + "base_id\030\003 \001(\t\"g\n\036ReconfigureCloudDatabas" + + "eAction\022\031\n\014database_uri\030\001 \001(\tH\000\210\001\001\022\031\n\021se" + + "rving_locations\030\002 \003(\tB\017\n\r_database_uri\"j" + + "\n\030ListCloudDatabasesAction\022\022\n\nproject_id" + + "\030\001 \001(\t\022\023\n\013instance_id\030\002 \001(\t\022\021\n\tpage_size" + + "\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"\234\001\n\030ListCloud" + + "InstancesAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\006f" + + "ilter\030\002 \001(\tH\000\210\001\001\022\026\n\tpage_size\030\003 \001(\005H\001\210\001\001" + + "\022\027\n\npage_token\030\004 \001(\tH\002\210\001\001B\t\n\007_filterB\014\n\n" + + "_page_sizeB\r\n\013_page_token\"A\n\026GetCloudIns" + + "tanceAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013insta" + + "nce_id\030\002 \001(\t\"\203\001\n!ListCloudDatabaseOperat" + + "ionsAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instan" + + "ce_id\030\002 \001(\t\022\016\n\006filter\030\003 \001(\t\022\021\n\tpage_size" + + "\030\004 \001(\005\022\022\n\npage_token\030\005 \001(\t\"\222\001\n\032RestoreCl" + + "oudDatabaseAction\022\022\n\nproject_id\030\001 \001(\t\022\032\n" + + "\022backup_instance_id\030\002 \001(\t\022\021\n\tbackup_id\030\003" + + " \001(\t\022\034\n\024database_instance_id\030\004 \001(\t\022\023\n\013da" + + "tabase_id\030\005 \001(\t\"V\n\026GetCloudDatabaseActio" + + "n\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instance_id\030\002 \001" + + "(\t\022\023\n\013database_id\030\003 \001(\t\"\351\001\n\027CreateCloudB" + + "ackupAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013insta" + + "nce_id\030\002 \001(\t\022\021\n\tbackup_id\030\003 \001(\t\022\023\n\013datab" + + "ase_id\030\004 \001(\t\0225\n\013expire_time\030\005 \001(\0132\032.goog" + + "le.protobuf.TimestampB\004\342A\001\003\0225\n\014version_t" + + "ime\030\006 \001(\0132\032.google.protobuf.TimestampH\000\210" + + "\001\001B\017\n\r_version_time\"\241\001\n\025CopyCloudBackupA" + + "ction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instance_id" + + "\030\002 \001(\t\022\021\n\tbackup_id\030\003 \001(\t\022\025\n\rsource_back" + + "up\030\004 \001(\t\0225\n\013expire_time\030\005 \001(\0132\032.google.p" + + "rotobuf.TimestampB\004\342A\001\003\"R\n\024GetCloudBacku" + + "pAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instance_" + + "id\030\002 \001(\t\022\021\n\tbackup_id\030\003 \001(\t\"\214\001\n\027UpdateCl" + + "oudBackupAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013i" + + "nstance_id\030\002 \001(\t\022\021\n\tbackup_id\030\003 \001(\t\0225\n\013e" + + "xpire_time\030\004 \001(\0132\032.google.protobuf.Times" + + "tampB\004\342A\001\003\"U\n\027DeleteCloudBackupAction\022\022\n" + + "\nproject_id\030\001 \001(\t\022\023\n\013instance_id\030\002 \001(\t\022\021" + + "\n\tbackup_id\030\003 \001(\t\"x\n\026ListCloudBackupsAct" + + "ion\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013instance_id\030\002" + + " \001(\t\022\016\n\006filter\030\003 \001(\t\022\021\n\tpage_size\030\004 \001(\005\022" + + "\022\n\npage_token\030\005 \001(\t\"\201\001\n\037ListCloudBackupO" + + "perationsAction\022\022\n\nproject_id\030\001 \001(\t\022\023\n\013i" + + "nstance_id\030\002 \001(\t\022\016\n\006filter\030\003 \001(\t\022\021\n\tpage" + + "_size\030\004 \001(\005\022\022\n\npage_token\030\005 \001(\t\"\'\n\022GetOp" + + "erationAction\022\021\n\toperation\030\001 \001(\t\"*\n\025Canc" + + "elOperationAction\022\021\n\toperation\030\001 \001(\t\"\210\001\n" + + "\033StartBatchTransactionAction\0224\n\016batch_tx" + + "n_time\030\001 \001(\0132\032.google.protobuf.Timestamp" + + "H\000\022\r\n\003tid\030\002 \001(\014H\000\022\033\n\023cloud_database_role" + + "\030\003 \001(\tB\007\n\005param\".\n\033CloseBatchTransaction" + + "Action\022\017\n\007cleanup\030\001 \001(\010\"\227\002\n!GenerateDbPa" + + "rtitionsForReadAction\0224\n\004read\030\001 \001(\0132&.go" + + "ogle.spanner.executor.v1.ReadAction\0228\n\005t" + + "able\030\002 \003(\0132).google.spanner.executor.v1." + + "TableMetadata\022(\n\033desired_bytes_per_parti" + + "tion\030\003 \001(\003H\000\210\001\001\022 \n\023max_partition_count\030\004" + + " \001(\003H\001\210\001\001B\036\n\034_desired_bytes_per_partitio" + + "nB\026\n\024_max_partition_count\"\246\001\n\"GenerateDb" + + "PartitionsForQueryAction\0226\n\005query\030\001 \001(\0132" + + "\'.google.spanner.executor.v1.QueryAction" + + "\022(\n\033desired_bytes_per_partition\030\002 \001(\003H\000\210" + + "\001\001B\036\n\034_desired_bytes_per_partition\"x\n\016Ba" + + "tchPartition\022\021\n\tpartition\030\001 \001(\014\022\027\n\017parti" + + "tion_token\030\002 \001(\014\022\022\n\005table\030\003 \001(\tH\000\210\001\001\022\022\n\005" + + "index\030\004 \001(\tH\001\210\001\001B\010\n\006_tableB\010\n\006_index\"W\n\026" + + "ExecutePartitionAction\022=\n\tpartition\030\001 \001(" + + "\0132*.google.spanner.executor.v1.BatchPart" + + "ition\"\216\003\n\030ExecuteChangeStreamQuery\022\014\n\004na" + + "me\030\001 \001(\t\022.\n\nstart_time\030\002 \001(\0132\032.google.pr" + + "otobuf.Timestamp\0221\n\010end_time\030\003 \001(\0132\032.goo" + + "gle.protobuf.TimestampH\000\210\001\001\022\034\n\017partition" + + "_token\030\004 \001(\tH\001\210\001\001\022\024\n\014read_options\030\005 \003(\t\022" + + "#\n\026heartbeat_milliseconds\030\006 \001(\005H\002\210\001\001\022\035\n\020" + + "deadline_seconds\030\007 \001(\003H\003\210\001\001\022 \n\023cloud_dat" + + "abase_role\030\010 \001(\tH\004\210\001\001B\013\n\t_end_timeB\022\n\020_p" + + "artition_tokenB\031\n\027_heartbeat_millisecond" + + "sB\023\n\021_deadline_secondsB\026\n\024_cloud_databas" + + "e_role\"\242\005\n\024SpannerActionOutcome\022\'\n\006statu" + + "s\030\001 \001(\0132\022.google.rpc.StatusH\000\210\001\001\0224\n\013comm" + + "it_time\030\002 \001(\0132\032.google.protobuf.Timestam" + + "pH\001\210\001\001\022@\n\013read_result\030\003 \001(\0132&.google.spa" + + "nner.executor.v1.ReadResultH\002\210\001\001\022B\n\014quer" + + "y_result\030\004 \001(\0132\'.google.spanner.executor" + + ".v1.QueryResultH\003\210\001\001\022\"\n\025transaction_rest" + + "arted\030\005 \001(\010H\004\210\001\001\022\031\n\014batch_txn_id\030\006 \001(\014H\005" + + "\210\001\001\022@\n\014db_partition\030\007 \003(\0132*.google.spann" + + "er.executor.v1.BatchPartition\022B\n\014admin_r" + + "esult\030\010 \001(\0132\'.google.spanner.executor.v1" + + ".AdminResultH\006\210\001\001\022\031\n\021dml_rows_modified\030\t" + + " \003(\003\022M\n\025change_stream_records\030\n \003(\0132..go" + + "ogle.spanner.executor.v1.ChangeStreamRec" + + "ordB\t\n\007_statusB\016\n\014_commit_timeB\016\n\014_read_" + + "resultB\017\n\r_query_resultB\030\n\026_transaction_" + + "restartedB\017\n\r_batch_txn_idB\017\n\r_admin_res" + + "ult\"\231\003\n\013AdminResult\022H\n\017backup_response\030\001" + + " \001(\0132/.google.spanner.executor.v1.CloudB" + + "ackupResponse\022I\n\022operation_response\030\002 \001(" + + "\0132-.google.spanner.executor.v1.Operation" + + "Response\022L\n\021database_response\030\003 \001(\01321.go" + + "ogle.spanner.executor.v1.CloudDatabaseRe" + + "sponse\022L\n\021instance_response\030\004 \001(\01321.goog" + + "le.spanner.executor.v1.CloudInstanceResp" + + "onse\022Y\n\030instance_config_response\030\005 \001(\01327" + + ".google.spanner.executor.v1.CloudInstanc" + + "eConfigResponse\"\353\001\n\023CloudBackupResponse\022" + + "@\n\016listed_backups\030\001 \003(\0132(.google.spanner" + + ".admin.database.v1.Backup\022?\n\030listed_back" + + "up_operations\030\002 \003(\0132\035.google.longrunning" + + ".Operation\022\027\n\017next_page_token\030\003 \001(\t\0228\n\006b" + + "ackup\030\004 \001(\0132(.google.spanner.admin.datab" + + "ase.v1.Backup\"\230\001\n\021OperationResponse\0228\n\021l" + + "isted_operations\030\001 \003(\0132\035.google.longrunn" + + "ing.Operation\022\027\n\017next_page_token\030\002 \001(\t\0220" + + "\n\toperation\030\003 \001(\0132\035.google.longrunning.O" + + "peration\"\264\001\n\025CloudInstanceResponse\022D\n\020li" + + "sted_instances\030\001 \003(\0132*.google.spanner.ad" + + "min.instance.v1.Instance\022\027\n\017next_page_to" + + "ken\030\002 \001(\t\022<\n\010instance\030\003 \001(\0132*.google.spa" + + "nner.admin.instance.v1.Instance\"\324\001\n\033Clou" + + "dInstanceConfigResponse\022Q\n\027listed_instan" + + "ce_configs\030\001 \003(\01320.google.spanner.admin." + + "instance.v1.InstanceConfig\022\027\n\017next_page_" + + "token\030\002 \001(\t\022I\n\017instance_config\030\003 \001(\01320.g" + + "oogle.spanner.admin.instance.v1.Instance" + + "Config\"\367\001\n\025CloudDatabaseResponse\022D\n\020list" + + "ed_databases\030\001 \003(\0132*.google.spanner.admi" + + "n.database.v1.Database\022A\n\032listed_databas" + + "e_operations\030\002 \003(\0132\035.google.longrunning." + + "Operation\022\027\n\017next_page_token\030\003 \001(\t\022<\n\010da" + + "tabase\030\004 \001(\0132*.google.spanner.admin.data" + + "base.v1.Database\"\336\001\n\nReadResult\022\r\n\005table" + + "\030\001 \001(\t\022\022\n\005index\030\002 \001(\tH\000\210\001\001\022\032\n\rrequest_in" + + "dex\030\003 \001(\005H\001\210\001\001\0222\n\003row\030\004 \003(\0132%.google.spa" + + "nner.executor.v1.ValueList\0224\n\010row_type\030\005" + + " \001(\0132\035.google.spanner.v1.StructTypeH\002\210\001\001" + + "B\010\n\006_indexB\020\n\016_request_indexB\013\n\t_row_typ", + "e\"\204\001\n\013QueryResult\0222\n\003row\030\001 \003(\0132%.google." + + "spanner.executor.v1.ValueList\0224\n\010row_typ" + + "e\030\002 \001(\0132\035.google.spanner.v1.StructTypeH\000" + + "\210\001\001B\013\n\t_row_type\"\363\001\n\022ChangeStreamRecord\022" + + "C\n\013data_change\030\001 \001(\0132,.google.spanner.ex" + + "ecutor.v1.DataChangeRecordH\000\022L\n\017child_pa" + + "rtition\030\002 \001(\01321.google.spanner.executor." + + "v1.ChildPartitionsRecordH\000\022@\n\theartbeat\030" + + "\003 \001(\0132+.google.spanner.executor.v1.Heart" + + "beatRecordH\000B\010\n\006record\"\330\004\n\020DataChangeRec" + + "ord\022/\n\013commit_time\030\001 \001(\0132\032.google.protob" + + "uf.Timestamp\022\027\n\017record_sequence\030\002 \001(\t\022\026\n" + + "\016transaction_id\030\003 \001(\t\022\026\n\016is_last_record\030" + + "\004 \001(\010\022\r\n\005table\030\005 \001(\t\022M\n\014column_types\030\006 \003" + + "(\01327.google.spanner.executor.v1.DataChan" + + "geRecord.ColumnType\022>\n\004mods\030\007 \003(\01320.goog" + + "le.spanner.executor.v1.DataChangeRecord." + + "Mod\022\020\n\010mod_type\030\010 \001(\t\022\032\n\022value_capture_t" + + "ype\030\t \001(\t\022\024\n\014record_count\030\n \001(\003\022\027\n\017parti" + + "tion_count\030\013 \001(\003\022\027\n\017transaction_tag\030\014 \001(" + + "\t\022\035\n\025is_system_transaction\030\r \001(\010\032Z\n\nColu" + + "mnType\022\014\n\004name\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022\026\n\016is" + + "_primary_key\030\003 \001(\010\022\030\n\020ordinal_position\030\004" + + " \001(\003\032;\n\003Mod\022\014\n\004keys\030\001 \001(\t\022\022\n\nnew_values\030" + + "\002 \001(\t\022\022\n\nold_values\030\003 \001(\t\"\376\001\n\025ChildParti" + + "tionsRecord\022.\n\nstart_time\030\001 \001(\0132\032.google" + + ".protobuf.Timestamp\022\027\n\017record_sequence\030\002" + + " \001(\t\022Z\n\020child_partitions\030\003 \003(\0132@.google." + + "spanner.executor.v1.ChildPartitionsRecor" + + "d.ChildPartition\032@\n\016ChildPartition\022\r\n\005to" + + "ken\030\001 \001(\t\022\037\n\027parent_partition_tokens\030\002 \003" + + "(\t\"E\n\017HeartbeatRecord\0222\n\016heartbeat_time\030" + + "\001 \001(\0132\032.google.protobuf.Timestamp2\314\001\n\024Sp" + + "annerExecutorProxy\022\211\001\n\022ExecuteActionAsyn" + + "c\0225.google.spanner.executor.v1.SpannerAs" + + "yncActionRequest\0326.google.spanner.execut" + + "or.v1.SpannerAsyncActionResponse\"\000(\0010\001\032(" + + "\312A%spanner-cloud-executor.googleapis.com" + + "Bx\n\036com.google.spanner.executor.v1B\022Clou" + + "dExecutorProtoP\001Z@cloud.google.com/go/sp" + + "anner/executor/apiv1/executorpb;executor" + + "pbb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.spanner.admin.database.v1.BackupProto.getDescriptor(), + com.google.spanner.admin.database.v1.CommonProto.getDescriptor(), + com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto.getDescriptor(), + com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto.getDescriptor(), + com.google.spanner.v1.SpannerProto.getDescriptor(), + com.google.spanner.v1.TypeProto.getDescriptor(), + }); + internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_descriptor, + new java.lang.String[] { + "ActionId", "Action", + }); + internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_descriptor, + new java.lang.String[] { + "ActionId", "Outcome", + }); + internal_static_google_spanner_executor_v1_SpannerAction_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_spanner_executor_v1_SpannerAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_SpannerAction_descriptor, + new java.lang.String[] { + "DatabasePath", + "Start", + "Finish", + "Read", + "Query", + "Mutation", + "Dml", + "BatchDml", + "Write", + "PartitionedUpdate", + "Admin", + "StartBatchTxn", + "CloseBatchTxn", + "GenerateDbPartitionsRead", + "GenerateDbPartitionsQuery", + "ExecutePartition", + "ExecuteChangeStreamQuery", + "Action", + }); + internal_static_google_spanner_executor_v1_ReadAction_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_spanner_executor_v1_ReadAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ReadAction_descriptor, + new java.lang.String[] { + "Table", "Index", "Column", "Keys", "Limit", "Index", + }); + internal_static_google_spanner_executor_v1_QueryAction_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_spanner_executor_v1_QueryAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_QueryAction_descriptor, + new java.lang.String[] { + "Sql", "Params", + }); + internal_static_google_spanner_executor_v1_QueryAction_Parameter_descriptor = + internal_static_google_spanner_executor_v1_QueryAction_descriptor.getNestedTypes().get(0); + internal_static_google_spanner_executor_v1_QueryAction_Parameter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_QueryAction_Parameter_descriptor, + new java.lang.String[] { + "Name", "Type", "Value", + }); + internal_static_google_spanner_executor_v1_DmlAction_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_spanner_executor_v1_DmlAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_DmlAction_descriptor, + new java.lang.String[] { + "Update", "AutocommitIfSupported", "AutocommitIfSupported", + }); + internal_static_google_spanner_executor_v1_BatchDmlAction_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_spanner_executor_v1_BatchDmlAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_BatchDmlAction_descriptor, + new java.lang.String[] { + "Updates", + }); + internal_static_google_spanner_executor_v1_Value_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_spanner_executor_v1_Value_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_Value_descriptor, + new java.lang.String[] { + "IsNull", + "IntValue", + "BoolValue", + "DoubleValue", + "BytesValue", + "StringValue", + "StructValue", + "TimestampValue", + "DateDaysValue", + "IsCommitTimestamp", + "ArrayValue", + "ArrayType", + "ValueType", + "ArrayType", + }); + internal_static_google_spanner_executor_v1_KeyRange_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_spanner_executor_v1_KeyRange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_KeyRange_descriptor, + new java.lang.String[] { + "Start", "Limit", "Type", "Type", + }); + internal_static_google_spanner_executor_v1_KeySet_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_spanner_executor_v1_KeySet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_KeySet_descriptor, + new java.lang.String[] { + "Point", "Range", "All", + }); + internal_static_google_spanner_executor_v1_ValueList_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_spanner_executor_v1_ValueList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ValueList_descriptor, + new java.lang.String[] { + "Value", + }); + internal_static_google_spanner_executor_v1_MutationAction_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_spanner_executor_v1_MutationAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_MutationAction_descriptor, + new java.lang.String[] { + "Mod", + }); + internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_descriptor = + internal_static_google_spanner_executor_v1_MutationAction_descriptor + .getNestedTypes() + .get(0); + internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_descriptor, + new java.lang.String[] { + "Column", "Type", "Values", + }); + internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_descriptor = + internal_static_google_spanner_executor_v1_MutationAction_descriptor + .getNestedTypes() + .get(1); + internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_descriptor, + new java.lang.String[] { + "Column", "Type", "Values", + }); + internal_static_google_spanner_executor_v1_MutationAction_Mod_descriptor = + internal_static_google_spanner_executor_v1_MutationAction_descriptor + .getNestedTypes() + .get(2); + internal_static_google_spanner_executor_v1_MutationAction_Mod_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_MutationAction_Mod_descriptor, + new java.lang.String[] { + "Table", "Insert", "Update", "InsertOrUpdate", "Replace", "DeleteKeys", + }); + internal_static_google_spanner_executor_v1_WriteMutationsAction_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_spanner_executor_v1_WriteMutationsAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_WriteMutationsAction_descriptor, + new java.lang.String[] { + "Mutation", + }); + internal_static_google_spanner_executor_v1_PartitionedUpdateAction_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_spanner_executor_v1_PartitionedUpdateAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_PartitionedUpdateAction_descriptor, + new java.lang.String[] { + "Options", "Update", "Options", + }); + internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_descriptor = + internal_static_google_spanner_executor_v1_PartitionedUpdateAction_descriptor + .getNestedTypes() + .get(0); + internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_descriptor, + new java.lang.String[] { + "RpcPriority", "Tag", "RpcPriority", "Tag", + }); + internal_static_google_spanner_executor_v1_StartTransactionAction_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_spanner_executor_v1_StartTransactionAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_StartTransactionAction_descriptor, + new java.lang.String[] { + "Concurrency", + "Table", + "TransactionSeed", + "ExecutionOptions", + "Concurrency", + "ExecutionOptions", + }); + internal_static_google_spanner_executor_v1_Concurrency_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_spanner_executor_v1_Concurrency_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_Concurrency_descriptor, + new java.lang.String[] { + "StalenessSeconds", + "MinReadTimestampMicros", + "MaxStalenessSeconds", + "ExactTimestampMicros", + "Strong", + "Batch", + "SnapshotEpochRead", + "SnapshotEpochRootTable", + "BatchReadTimestampMicros", + "ConcurrencyMode", + }); + internal_static_google_spanner_executor_v1_TableMetadata_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_spanner_executor_v1_TableMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_TableMetadata_descriptor, + new java.lang.String[] { + "Name", "Column", "KeyColumn", + }); + internal_static_google_spanner_executor_v1_ColumnMetadata_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_spanner_executor_v1_ColumnMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ColumnMetadata_descriptor, + new java.lang.String[] { + "Name", "Type", + }); + internal_static_google_spanner_executor_v1_TransactionExecutionOptions_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_spanner_executor_v1_TransactionExecutionOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_TransactionExecutionOptions_descriptor, + new java.lang.String[] { + "Optimistic", + }); + internal_static_google_spanner_executor_v1_FinishTransactionAction_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_spanner_executor_v1_FinishTransactionAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_FinishTransactionAction_descriptor, + new java.lang.String[] { + "Mode", + }); + internal_static_google_spanner_executor_v1_AdminAction_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_spanner_executor_v1_AdminAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_AdminAction_descriptor, + new java.lang.String[] { + "CreateUserInstanceConfig", + "UpdateUserInstanceConfig", + "DeleteUserInstanceConfig", + "GetCloudInstanceConfig", + "ListInstanceConfigs", + "CreateCloudInstance", + "UpdateCloudInstance", + "DeleteCloudInstance", + "ListCloudInstances", + "GetCloudInstance", + "CreateCloudDatabase", + "UpdateCloudDatabaseDdl", + "UpdateCloudDatabase", + "DropCloudDatabase", + "ListCloudDatabases", + "ListCloudDatabaseOperations", + "RestoreCloudDatabase", + "GetCloudDatabase", + "CreateCloudBackup", + "CopyCloudBackup", + "GetCloudBackup", + "UpdateCloudBackup", + "DeleteCloudBackup", + "ListCloudBackups", + "ListCloudBackupOperations", + "GetOperation", + "CancelOperation", + "ReconfigureCloudDatabase", + "Action", + }); + internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_descriptor, + new java.lang.String[] { + "UserConfigId", "ProjectId", "BaseConfigId", "Replicas", + }); + internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_descriptor, + new java.lang.String[] { + "UserConfigId", "ProjectId", "DisplayName", "Labels", "DisplayName", + }); + internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_LabelsEntry_descriptor = + internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_descriptor + .getNestedTypes() + .get(0); + internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_descriptor, + new java.lang.String[] { + "InstanceConfigId", "ProjectId", + }); + internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_descriptor, + new java.lang.String[] { + "UserConfigId", "ProjectId", + }); + internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_descriptor, + new java.lang.String[] { + "ProjectId", "PageSize", "PageToken", "PageSize", "PageToken", + }); + internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_descriptor, + new java.lang.String[] { + "InstanceId", + "ProjectId", + "InstanceConfigId", + "NodeCount", + "ProcessingUnits", + "AutoscalingConfig", + "Labels", + "NodeCount", + "ProcessingUnits", + "AutoscalingConfig", + }); + internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_LabelsEntry_descriptor = + internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_descriptor + .getNestedTypes() + .get(0); + internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_descriptor, + new java.lang.String[] { + "InstanceId", + "ProjectId", + "DisplayName", + "NodeCount", + "ProcessingUnits", + "AutoscalingConfig", + "Labels", + "DisplayName", + "NodeCount", + "ProcessingUnits", + "AutoscalingConfig", + }); + internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_LabelsEntry_descriptor = + internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_descriptor + .getNestedTypes() + .get(0); + internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_descriptor, + new java.lang.String[] { + "InstanceId", "ProjectId", + }); + internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_descriptor, + new java.lang.String[] { + "InstanceId", + "ProjectId", + "DatabaseId", + "SdlStatement", + "EncryptionConfig", + "Dialect", + "ProtoDescriptors", + "Dialect", + "ProtoDescriptors", + }); + internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_descriptor, + new java.lang.String[] { + "InstanceId", + "ProjectId", + "DatabaseId", + "SdlStatement", + "OperationId", + "ProtoDescriptors", + "ProtoDescriptors", + }); + internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_descriptor, + new java.lang.String[] { + "InstanceId", "ProjectId", "DatabaseName", "EnableDropProtection", + }); + internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_descriptor, + new java.lang.String[] { + "InstanceId", "ProjectId", "DatabaseId", + }); + internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_descriptor, + new java.lang.String[] { + "DatabaseUri", "ServingLocations", "DatabaseUri", + }); + internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "PageSize", "PageToken", + }); + internal_static_google_spanner_executor_v1_ListCloudInstancesAction_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_spanner_executor_v1_ListCloudInstancesAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ListCloudInstancesAction_descriptor, + new java.lang.String[] { + "ProjectId", "Filter", "PageSize", "PageToken", "Filter", "PageSize", "PageToken", + }); + internal_static_google_spanner_executor_v1_GetCloudInstanceAction_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_spanner_executor_v1_GetCloudInstanceAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_GetCloudInstanceAction_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", + }); + internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "Filter", "PageSize", "PageToken", + }); + internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_descriptor, + new java.lang.String[] { + "ProjectId", "BackupInstanceId", "BackupId", "DatabaseInstanceId", "DatabaseId", + }); + internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "DatabaseId", + }); + internal_static_google_spanner_executor_v1_CreateCloudBackupAction_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_google_spanner_executor_v1_CreateCloudBackupAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_CreateCloudBackupAction_descriptor, + new java.lang.String[] { + "ProjectId", + "InstanceId", + "BackupId", + "DatabaseId", + "ExpireTime", + "VersionTime", + "VersionTime", + }); + internal_static_google_spanner_executor_v1_CopyCloudBackupAction_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_google_spanner_executor_v1_CopyCloudBackupAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_CopyCloudBackupAction_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "BackupId", "SourceBackup", "ExpireTime", + }); + internal_static_google_spanner_executor_v1_GetCloudBackupAction_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_google_spanner_executor_v1_GetCloudBackupAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_GetCloudBackupAction_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "BackupId", + }); + internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "BackupId", "ExpireTime", + }); + internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "BackupId", + }); + internal_static_google_spanner_executor_v1_ListCloudBackupsAction_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_google_spanner_executor_v1_ListCloudBackupsAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ListCloudBackupsAction_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "Filter", "PageSize", "PageToken", + }); + internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_descriptor = + getDescriptor().getMessageTypes().get(46); + internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_descriptor, + new java.lang.String[] { + "ProjectId", "InstanceId", "Filter", "PageSize", "PageToken", + }); + internal_static_google_spanner_executor_v1_GetOperationAction_descriptor = + getDescriptor().getMessageTypes().get(47); + internal_static_google_spanner_executor_v1_GetOperationAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_GetOperationAction_descriptor, + new java.lang.String[] { + "Operation", + }); + internal_static_google_spanner_executor_v1_CancelOperationAction_descriptor = + getDescriptor().getMessageTypes().get(48); + internal_static_google_spanner_executor_v1_CancelOperationAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_CancelOperationAction_descriptor, + new java.lang.String[] { + "Operation", + }); + internal_static_google_spanner_executor_v1_StartBatchTransactionAction_descriptor = + getDescriptor().getMessageTypes().get(49); + internal_static_google_spanner_executor_v1_StartBatchTransactionAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_StartBatchTransactionAction_descriptor, + new java.lang.String[] { + "BatchTxnTime", "Tid", "CloudDatabaseRole", "Param", + }); + internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_descriptor = + getDescriptor().getMessageTypes().get(50); + internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_CloseBatchTransactionAction_descriptor, + new java.lang.String[] { + "Cleanup", + }); + internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_descriptor = + getDescriptor().getMessageTypes().get(51); + internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_descriptor, + new java.lang.String[] { + "Read", + "Table", + "DesiredBytesPerPartition", + "MaxPartitionCount", + "DesiredBytesPerPartition", + "MaxPartitionCount", + }); + internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_descriptor = + getDescriptor().getMessageTypes().get(52); + internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_descriptor, + new java.lang.String[] { + "Query", "DesiredBytesPerPartition", "DesiredBytesPerPartition", + }); + internal_static_google_spanner_executor_v1_BatchPartition_descriptor = + getDescriptor().getMessageTypes().get(53); + internal_static_google_spanner_executor_v1_BatchPartition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_BatchPartition_descriptor, + new java.lang.String[] { + "Partition", "PartitionToken", "Table", "Index", "Table", "Index", + }); + internal_static_google_spanner_executor_v1_ExecutePartitionAction_descriptor = + getDescriptor().getMessageTypes().get(54); + internal_static_google_spanner_executor_v1_ExecutePartitionAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ExecutePartitionAction_descriptor, + new java.lang.String[] { + "Partition", + }); + internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_descriptor = + getDescriptor().getMessageTypes().get(55); + internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_descriptor, + new java.lang.String[] { + "Name", + "StartTime", + "EndTime", + "PartitionToken", + "ReadOptions", + "HeartbeatMilliseconds", + "DeadlineSeconds", + "CloudDatabaseRole", + "EndTime", + "PartitionToken", + "HeartbeatMilliseconds", + "DeadlineSeconds", + "CloudDatabaseRole", + }); + internal_static_google_spanner_executor_v1_SpannerActionOutcome_descriptor = + getDescriptor().getMessageTypes().get(56); + internal_static_google_spanner_executor_v1_SpannerActionOutcome_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_SpannerActionOutcome_descriptor, + new java.lang.String[] { + "Status", + "CommitTime", + "ReadResult", + "QueryResult", + "TransactionRestarted", + "BatchTxnId", + "DbPartition", + "AdminResult", + "DmlRowsModified", + "ChangeStreamRecords", + "Status", + "CommitTime", + "ReadResult", + "QueryResult", + "TransactionRestarted", + "BatchTxnId", + "AdminResult", + }); + internal_static_google_spanner_executor_v1_AdminResult_descriptor = + getDescriptor().getMessageTypes().get(57); + internal_static_google_spanner_executor_v1_AdminResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_AdminResult_descriptor, + new java.lang.String[] { + "BackupResponse", + "OperationResponse", + "DatabaseResponse", + "InstanceResponse", + "InstanceConfigResponse", + }); + internal_static_google_spanner_executor_v1_CloudBackupResponse_descriptor = + getDescriptor().getMessageTypes().get(58); + internal_static_google_spanner_executor_v1_CloudBackupResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_CloudBackupResponse_descriptor, + new java.lang.String[] { + "ListedBackups", "ListedBackupOperations", "NextPageToken", "Backup", + }); + internal_static_google_spanner_executor_v1_OperationResponse_descriptor = + getDescriptor().getMessageTypes().get(59); + internal_static_google_spanner_executor_v1_OperationResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_OperationResponse_descriptor, + new java.lang.String[] { + "ListedOperations", "NextPageToken", "Operation", + }); + internal_static_google_spanner_executor_v1_CloudInstanceResponse_descriptor = + getDescriptor().getMessageTypes().get(60); + internal_static_google_spanner_executor_v1_CloudInstanceResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_CloudInstanceResponse_descriptor, + new java.lang.String[] { + "ListedInstances", "NextPageToken", "Instance", + }); + internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_descriptor = + getDescriptor().getMessageTypes().get(61); + internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_descriptor, + new java.lang.String[] { + "ListedInstanceConfigs", "NextPageToken", "InstanceConfig", + }); + internal_static_google_spanner_executor_v1_CloudDatabaseResponse_descriptor = + getDescriptor().getMessageTypes().get(62); + internal_static_google_spanner_executor_v1_CloudDatabaseResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_CloudDatabaseResponse_descriptor, + new java.lang.String[] { + "ListedDatabases", "ListedDatabaseOperations", "NextPageToken", "Database", + }); + internal_static_google_spanner_executor_v1_ReadResult_descriptor = + getDescriptor().getMessageTypes().get(63); + internal_static_google_spanner_executor_v1_ReadResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ReadResult_descriptor, + new java.lang.String[] { + "Table", + "Index", + "RequestIndex", + "Row", + "RowType", + "Index", + "RequestIndex", + "RowType", + }); + internal_static_google_spanner_executor_v1_QueryResult_descriptor = + getDescriptor().getMessageTypes().get(64); + internal_static_google_spanner_executor_v1_QueryResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_QueryResult_descriptor, + new java.lang.String[] { + "Row", "RowType", "RowType", + }); + internal_static_google_spanner_executor_v1_ChangeStreamRecord_descriptor = + getDescriptor().getMessageTypes().get(65); + internal_static_google_spanner_executor_v1_ChangeStreamRecord_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ChangeStreamRecord_descriptor, + new java.lang.String[] { + "DataChange", "ChildPartition", "Heartbeat", "Record", + }); + internal_static_google_spanner_executor_v1_DataChangeRecord_descriptor = + getDescriptor().getMessageTypes().get(66); + internal_static_google_spanner_executor_v1_DataChangeRecord_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_DataChangeRecord_descriptor, + new java.lang.String[] { + "CommitTime", + "RecordSequence", + "TransactionId", + "IsLastRecord", + "Table", + "ColumnTypes", + "Mods", + "ModType", + "ValueCaptureType", + "RecordCount", + "PartitionCount", + "TransactionTag", + "IsSystemTransaction", + }); + internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_descriptor = + internal_static_google_spanner_executor_v1_DataChangeRecord_descriptor + .getNestedTypes() + .get(0); + internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_descriptor, + new java.lang.String[] { + "Name", "Type", "IsPrimaryKey", "OrdinalPosition", + }); + internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_descriptor = + internal_static_google_spanner_executor_v1_DataChangeRecord_descriptor + .getNestedTypes() + .get(1); + internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_descriptor, + new java.lang.String[] { + "Keys", "NewValues", "OldValues", + }); + internal_static_google_spanner_executor_v1_ChildPartitionsRecord_descriptor = + getDescriptor().getMessageTypes().get(67); + internal_static_google_spanner_executor_v1_ChildPartitionsRecord_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ChildPartitionsRecord_descriptor, + new java.lang.String[] { + "StartTime", "RecordSequence", "ChildPartitions", + }); + internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_descriptor = + internal_static_google_spanner_executor_v1_ChildPartitionsRecord_descriptor + .getNestedTypes() + .get(0); + internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_ChildPartitionsRecord_ChildPartition_descriptor, + new java.lang.String[] { + "Token", "ParentPartitionTokens", + }); + internal_static_google_spanner_executor_v1_HeartbeatRecord_descriptor = + getDescriptor().getMessageTypes().get(68); + internal_static_google_spanner_executor_v1_HeartbeatRecord_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_executor_v1_HeartbeatRecord_descriptor, + new java.lang.String[] { + "HeartbeatTime", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.spanner.admin.database.v1.BackupProto.getDescriptor(); + com.google.spanner.admin.database.v1.CommonProto.getDescriptor(); + com.google.spanner.admin.database.v1.SpannerDatabaseAdminProto.getDescriptor(); + com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto.getDescriptor(); + com.google.spanner.v1.SpannerProto.getDescriptor(); + com.google.spanner.v1.TypeProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudInstanceConfigResponse.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudInstanceConfigResponse.java new file mode 100644 index 00000000000..21bb70d4246 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudInstanceConfigResponse.java @@ -0,0 +1,1439 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * CloudInstanceConfigResponse contains results returned by cloud instance
+ * config related actions.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CloudInstanceConfigResponse} + */ +public final class CloudInstanceConfigResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CloudInstanceConfigResponse) + CloudInstanceConfigResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudInstanceConfigResponse.newBuilder() to construct. + private CloudInstanceConfigResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudInstanceConfigResponse() { + listedInstanceConfigs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudInstanceConfigResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CloudInstanceConfigResponse.class, + com.google.spanner.executor.v1.CloudInstanceConfigResponse.Builder.class); + } + + public static final int LISTED_INSTANCE_CONFIGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + listedInstanceConfigs_; + /** + * + * + *
+   * List of instance configs returned by ListCloudInstanceConfigsAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + @java.lang.Override + public java.util.List + getListedInstanceConfigsList() { + return listedInstanceConfigs_; + } + /** + * + * + *
+   * List of instance configs returned by ListCloudInstanceConfigsAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + @java.lang.Override + public java.util.List + getListedInstanceConfigsOrBuilderList() { + return listedInstanceConfigs_; + } + /** + * + * + *
+   * List of instance configs returned by ListCloudInstanceConfigsAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + @java.lang.Override + public int getListedInstanceConfigsCount() { + return listedInstanceConfigs_.size(); + } + /** + * + * + *
+   * List of instance configs returned by ListCloudInstanceConfigsAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstanceConfig getListedInstanceConfigs(int index) { + return listedInstanceConfigs_.get(index); + } + /** + * + * + *
+   * List of instance configs returned by ListCloudInstanceConfigsAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder + getListedInstanceConfigsOrBuilder(int index) { + return listedInstanceConfigs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_CONFIG_FIELD_NUMBER = 3; + private com.google.spanner.admin.instance.v1.InstanceConfig instanceConfig_; + /** + * + * + *
+   * Instance config returned by GetCloudInstanceConfigAction.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + * + * @return Whether the instanceConfig field is set. + */ + @java.lang.Override + public boolean hasInstanceConfig() { + return instanceConfig_ != null; + } + /** + * + * + *
+   * Instance config returned by GetCloudInstanceConfigAction.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + * + * @return The instanceConfig. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstanceConfig getInstanceConfig() { + return instanceConfig_ == null + ? com.google.spanner.admin.instance.v1.InstanceConfig.getDefaultInstance() + : instanceConfig_; + } + /** + * + * + *
+   * Instance config returned by GetCloudInstanceConfigAction.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder getInstanceConfigOrBuilder() { + return instanceConfig_ == null + ? com.google.spanner.admin.instance.v1.InstanceConfig.getDefaultInstance() + : instanceConfig_; + } + + 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 < listedInstanceConfigs_.size(); i++) { + output.writeMessage(1, listedInstanceConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + if (instanceConfig_ != null) { + output.writeMessage(3, getInstanceConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < listedInstanceConfigs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, listedInstanceConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + if (instanceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstanceConfig()); + } + 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.executor.v1.CloudInstanceConfigResponse)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.CloudInstanceConfigResponse other = + (com.google.spanner.executor.v1.CloudInstanceConfigResponse) obj; + + if (!getListedInstanceConfigsList().equals(other.getListedInstanceConfigsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (hasInstanceConfig() != other.hasInstanceConfig()) return false; + if (hasInstanceConfig()) { + if (!getInstanceConfig().equals(other.getInstanceConfig())) 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 (getListedInstanceConfigsCount() > 0) { + hash = (37 * hash) + LISTED_INSTANCE_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getListedInstanceConfigsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (hasInstanceConfig()) { + hash = (37 * hash) + INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInstanceConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.CloudInstanceConfigResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloudInstanceConfigResponse 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.executor.v1.CloudInstanceConfigResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloudInstanceConfigResponse 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.executor.v1.CloudInstanceConfigResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloudInstanceConfigResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.CloudInstanceConfigResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloudInstanceConfigResponse 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.executor.v1.CloudInstanceConfigResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloudInstanceConfigResponse 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.executor.v1.CloudInstanceConfigResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloudInstanceConfigResponse 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.executor.v1.CloudInstanceConfigResponse 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; + } + /** + * + * + *
+   * CloudInstanceConfigResponse contains results returned by cloud instance
+   * config related actions.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CloudInstanceConfigResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CloudInstanceConfigResponse) + com.google.spanner.executor.v1.CloudInstanceConfigResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CloudInstanceConfigResponse.class, + com.google.spanner.executor.v1.CloudInstanceConfigResponse.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.CloudInstanceConfigResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (listedInstanceConfigsBuilder_ == null) { + listedInstanceConfigs_ = java.util.Collections.emptyList(); + } else { + listedInstanceConfigs_ = null; + listedInstanceConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + instanceConfig_ = null; + if (instanceConfigBuilder_ != null) { + instanceConfigBuilder_.dispose(); + instanceConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudInstanceConfigResponse_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloudInstanceConfigResponse getDefaultInstanceForType() { + return com.google.spanner.executor.v1.CloudInstanceConfigResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloudInstanceConfigResponse build() { + com.google.spanner.executor.v1.CloudInstanceConfigResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloudInstanceConfigResponse buildPartial() { + com.google.spanner.executor.v1.CloudInstanceConfigResponse result = + new com.google.spanner.executor.v1.CloudInstanceConfigResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.CloudInstanceConfigResponse result) { + if (listedInstanceConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + listedInstanceConfigs_ = java.util.Collections.unmodifiableList(listedInstanceConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.listedInstanceConfigs_ = listedInstanceConfigs_; + } else { + result.listedInstanceConfigs_ = listedInstanceConfigsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.CloudInstanceConfigResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.instanceConfig_ = + instanceConfigBuilder_ == null ? instanceConfig_ : instanceConfigBuilder_.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.executor.v1.CloudInstanceConfigResponse) { + return mergeFrom((com.google.spanner.executor.v1.CloudInstanceConfigResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.CloudInstanceConfigResponse other) { + if (other == com.google.spanner.executor.v1.CloudInstanceConfigResponse.getDefaultInstance()) + return this; + if (listedInstanceConfigsBuilder_ == null) { + if (!other.listedInstanceConfigs_.isEmpty()) { + if (listedInstanceConfigs_.isEmpty()) { + listedInstanceConfigs_ = other.listedInstanceConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListedInstanceConfigsIsMutable(); + listedInstanceConfigs_.addAll(other.listedInstanceConfigs_); + } + onChanged(); + } + } else { + if (!other.listedInstanceConfigs_.isEmpty()) { + if (listedInstanceConfigsBuilder_.isEmpty()) { + listedInstanceConfigsBuilder_.dispose(); + listedInstanceConfigsBuilder_ = null; + listedInstanceConfigs_ = other.listedInstanceConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + listedInstanceConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getListedInstanceConfigsFieldBuilder() + : null; + } else { + listedInstanceConfigsBuilder_.addAllMessages(other.listedInstanceConfigs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasInstanceConfig()) { + mergeInstanceConfig(other.getInstanceConfig()); + } + 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.admin.instance.v1.InstanceConfig m = + input.readMessage( + com.google.spanner.admin.instance.v1.InstanceConfig.parser(), + extensionRegistry); + if (listedInstanceConfigsBuilder_ == null) { + ensureListedInstanceConfigsIsMutable(); + listedInstanceConfigs_.add(m); + } else { + listedInstanceConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getInstanceConfigFieldBuilder().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 java.util.List + listedInstanceConfigs_ = java.util.Collections.emptyList(); + + private void ensureListedInstanceConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + listedInstanceConfigs_ = + new java.util.ArrayList( + listedInstanceConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstanceConfig, + com.google.spanner.admin.instance.v1.InstanceConfig.Builder, + com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> + listedInstanceConfigsBuilder_; + + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public java.util.List + getListedInstanceConfigsList() { + if (listedInstanceConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(listedInstanceConfigs_); + } else { + return listedInstanceConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public int getListedInstanceConfigsCount() { + if (listedInstanceConfigsBuilder_ == null) { + return listedInstanceConfigs_.size(); + } else { + return listedInstanceConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public com.google.spanner.admin.instance.v1.InstanceConfig getListedInstanceConfigs(int index) { + if (listedInstanceConfigsBuilder_ == null) { + return listedInstanceConfigs_.get(index); + } else { + return listedInstanceConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public Builder setListedInstanceConfigs( + int index, com.google.spanner.admin.instance.v1.InstanceConfig value) { + if (listedInstanceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedInstanceConfigsIsMutable(); + listedInstanceConfigs_.set(index, value); + onChanged(); + } else { + listedInstanceConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public Builder setListedInstanceConfigs( + int index, com.google.spanner.admin.instance.v1.InstanceConfig.Builder builderForValue) { + if (listedInstanceConfigsBuilder_ == null) { + ensureListedInstanceConfigsIsMutable(); + listedInstanceConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + listedInstanceConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public Builder addListedInstanceConfigs( + com.google.spanner.admin.instance.v1.InstanceConfig value) { + if (listedInstanceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedInstanceConfigsIsMutable(); + listedInstanceConfigs_.add(value); + onChanged(); + } else { + listedInstanceConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public Builder addListedInstanceConfigs( + int index, com.google.spanner.admin.instance.v1.InstanceConfig value) { + if (listedInstanceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedInstanceConfigsIsMutable(); + listedInstanceConfigs_.add(index, value); + onChanged(); + } else { + listedInstanceConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public Builder addListedInstanceConfigs( + com.google.spanner.admin.instance.v1.InstanceConfig.Builder builderForValue) { + if (listedInstanceConfigsBuilder_ == null) { + ensureListedInstanceConfigsIsMutable(); + listedInstanceConfigs_.add(builderForValue.build()); + onChanged(); + } else { + listedInstanceConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public Builder addListedInstanceConfigs( + int index, com.google.spanner.admin.instance.v1.InstanceConfig.Builder builderForValue) { + if (listedInstanceConfigsBuilder_ == null) { + ensureListedInstanceConfigsIsMutable(); + listedInstanceConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + listedInstanceConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public Builder addAllListedInstanceConfigs( + java.lang.Iterable values) { + if (listedInstanceConfigsBuilder_ == null) { + ensureListedInstanceConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, listedInstanceConfigs_); + onChanged(); + } else { + listedInstanceConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public Builder clearListedInstanceConfigs() { + if (listedInstanceConfigsBuilder_ == null) { + listedInstanceConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listedInstanceConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public Builder removeListedInstanceConfigs(int index) { + if (listedInstanceConfigsBuilder_ == null) { + ensureListedInstanceConfigsIsMutable(); + listedInstanceConfigs_.remove(index); + onChanged(); + } else { + listedInstanceConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public com.google.spanner.admin.instance.v1.InstanceConfig.Builder + getListedInstanceConfigsBuilder(int index) { + return getListedInstanceConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder + getListedInstanceConfigsOrBuilder(int index) { + if (listedInstanceConfigsBuilder_ == null) { + return listedInstanceConfigs_.get(index); + } else { + return listedInstanceConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public java.util.List + getListedInstanceConfigsOrBuilderList() { + if (listedInstanceConfigsBuilder_ != null) { + return listedInstanceConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(listedInstanceConfigs_); + } + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public com.google.spanner.admin.instance.v1.InstanceConfig.Builder + addListedInstanceConfigsBuilder() { + return getListedInstanceConfigsFieldBuilder() + .addBuilder(com.google.spanner.admin.instance.v1.InstanceConfig.getDefaultInstance()); + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public com.google.spanner.admin.instance.v1.InstanceConfig.Builder + addListedInstanceConfigsBuilder(int index) { + return getListedInstanceConfigsFieldBuilder() + .addBuilder( + index, com.google.spanner.admin.instance.v1.InstanceConfig.getDefaultInstance()); + } + /** + * + * + *
+     * List of instance configs returned by ListCloudInstanceConfigsAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + public java.util.List + getListedInstanceConfigsBuilderList() { + return getListedInstanceConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstanceConfig, + com.google.spanner.admin.instance.v1.InstanceConfig.Builder, + com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> + getListedInstanceConfigsFieldBuilder() { + if (listedInstanceConfigsBuilder_ == null) { + listedInstanceConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstanceConfig, + com.google.spanner.admin.instance.v1.InstanceConfig.Builder, + com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder>( + listedInstanceConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + listedInstanceConfigs_ = null; + } + return listedInstanceConfigsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.spanner.admin.instance.v1.InstanceConfig instanceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstanceConfig, + com.google.spanner.admin.instance.v1.InstanceConfig.Builder, + com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> + instanceConfigBuilder_; + /** + * + * + *
+     * Instance config returned by GetCloudInstanceConfigAction.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + * + * @return Whether the instanceConfig field is set. + */ + public boolean hasInstanceConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Instance config returned by GetCloudInstanceConfigAction.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + * + * @return The instanceConfig. + */ + public com.google.spanner.admin.instance.v1.InstanceConfig getInstanceConfig() { + if (instanceConfigBuilder_ == null) { + return instanceConfig_ == null + ? com.google.spanner.admin.instance.v1.InstanceConfig.getDefaultInstance() + : instanceConfig_; + } else { + return instanceConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Instance config returned by GetCloudInstanceConfigAction.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + */ + public Builder setInstanceConfig(com.google.spanner.admin.instance.v1.InstanceConfig value) { + if (instanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceConfig_ = value; + } else { + instanceConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Instance config returned by GetCloudInstanceConfigAction.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + */ + public Builder setInstanceConfig( + com.google.spanner.admin.instance.v1.InstanceConfig.Builder builderForValue) { + if (instanceConfigBuilder_ == null) { + instanceConfig_ = builderForValue.build(); + } else { + instanceConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Instance config returned by GetCloudInstanceConfigAction.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + */ + public Builder mergeInstanceConfig(com.google.spanner.admin.instance.v1.InstanceConfig value) { + if (instanceConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && instanceConfig_ != null + && instanceConfig_ + != com.google.spanner.admin.instance.v1.InstanceConfig.getDefaultInstance()) { + getInstanceConfigBuilder().mergeFrom(value); + } else { + instanceConfig_ = value; + } + } else { + instanceConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Instance config returned by GetCloudInstanceConfigAction.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + */ + public Builder clearInstanceConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + instanceConfig_ = null; + if (instanceConfigBuilder_ != null) { + instanceConfigBuilder_.dispose(); + instanceConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Instance config returned by GetCloudInstanceConfigAction.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + */ + public com.google.spanner.admin.instance.v1.InstanceConfig.Builder getInstanceConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getInstanceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Instance config returned by GetCloudInstanceConfigAction.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + */ + public com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder + getInstanceConfigOrBuilder() { + if (instanceConfigBuilder_ != null) { + return instanceConfigBuilder_.getMessageOrBuilder(); + } else { + return instanceConfig_ == null + ? com.google.spanner.admin.instance.v1.InstanceConfig.getDefaultInstance() + : instanceConfig_; + } + } + /** + * + * + *
+     * Instance config returned by GetCloudInstanceConfigAction.
+     * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstanceConfig, + com.google.spanner.admin.instance.v1.InstanceConfig.Builder, + com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder> + getInstanceConfigFieldBuilder() { + if (instanceConfigBuilder_ == null) { + instanceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.InstanceConfig, + com.google.spanner.admin.instance.v1.InstanceConfig.Builder, + com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder>( + getInstanceConfig(), getParentForChildren(), isClean()); + instanceConfig_ = null; + } + return instanceConfigBuilder_; + } + + @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.executor.v1.CloudInstanceConfigResponse) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.CloudInstanceConfigResponse) + private static final com.google.spanner.executor.v1.CloudInstanceConfigResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.CloudInstanceConfigResponse(); + } + + public static com.google.spanner.executor.v1.CloudInstanceConfigResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudInstanceConfigResponse 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.executor.v1.CloudInstanceConfigResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudInstanceConfigResponseOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudInstanceConfigResponseOrBuilder.java new file mode 100644 index 00000000000..a7fd4d019b1 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudInstanceConfigResponseOrBuilder.java @@ -0,0 +1,146 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface CloudInstanceConfigResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CloudInstanceConfigResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of instance configs returned by ListCloudInstanceConfigsAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + java.util.List + getListedInstanceConfigsList(); + /** + * + * + *
+   * List of instance configs returned by ListCloudInstanceConfigsAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + com.google.spanner.admin.instance.v1.InstanceConfig getListedInstanceConfigs(int index); + /** + * + * + *
+   * List of instance configs returned by ListCloudInstanceConfigsAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + int getListedInstanceConfigsCount(); + /** + * + * + *
+   * List of instance configs returned by ListCloudInstanceConfigsAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + java.util.List + getListedInstanceConfigsOrBuilderList(); + /** + * + * + *
+   * List of instance configs returned by ListCloudInstanceConfigsAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.InstanceConfig listed_instance_configs = 1; + * + */ + com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder getListedInstanceConfigsOrBuilder( + int index); + + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Instance config returned by GetCloudInstanceConfigAction.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + * + * @return Whether the instanceConfig field is set. + */ + boolean hasInstanceConfig(); + /** + * + * + *
+   * Instance config returned by GetCloudInstanceConfigAction.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + * + * @return The instanceConfig. + */ + com.google.spanner.admin.instance.v1.InstanceConfig getInstanceConfig(); + /** + * + * + *
+   * Instance config returned by GetCloudInstanceConfigAction.
+   * 
+ * + * .google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; + */ + com.google.spanner.admin.instance.v1.InstanceConfigOrBuilder getInstanceConfigOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudInstanceResponse.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudInstanceResponse.java new file mode 100644 index 00000000000..20e31f94b9f --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudInstanceResponse.java @@ -0,0 +1,1403 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * CloudInstanceResponse contains results returned by cloud instance related
+ * actions.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CloudInstanceResponse} + */ +public final class CloudInstanceResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CloudInstanceResponse) + CloudInstanceResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudInstanceResponse.newBuilder() to construct. + private CloudInstanceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudInstanceResponse() { + listedInstances_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudInstanceResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudInstanceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudInstanceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CloudInstanceResponse.class, + com.google.spanner.executor.v1.CloudInstanceResponse.Builder.class); + } + + public static final int LISTED_INSTANCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List listedInstances_; + /** + * + * + *
+   * List of instances returned by ListCloudInstancesAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + @java.lang.Override + public java.util.List getListedInstancesList() { + return listedInstances_; + } + /** + * + * + *
+   * List of instances returned by ListCloudInstancesAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + @java.lang.Override + public java.util.List + getListedInstancesOrBuilderList() { + return listedInstances_; + } + /** + * + * + *
+   * List of instances returned by ListCloudInstancesAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + @java.lang.Override + public int getListedInstancesCount() { + return listedInstances_.size(); + } + /** + * + * + *
+   * List of instances returned by ListCloudInstancesAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.Instance getListedInstances(int index) { + return listedInstances_.get(index); + } + /** + * + * + *
+   * List of instances returned by ListCloudInstancesAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstanceOrBuilder getListedInstancesOrBuilder( + int index) { + return listedInstances_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 3; + private com.google.spanner.admin.instance.v1.Instance instance_; + /** + * + * + *
+   * Instance returned by GetCloudInstanceAction
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return instance_ != null; + } + /** + * + * + *
+   * Instance returned by GetCloudInstanceAction
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + * + * @return The instance. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.Instance getInstance() { + return instance_ == null + ? com.google.spanner.admin.instance.v1.Instance.getDefaultInstance() + : instance_; + } + /** + * + * + *
+   * Instance returned by GetCloudInstanceAction
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuilder() { + return instance_ == null + ? com.google.spanner.admin.instance.v1.Instance.getDefaultInstance() + : instance_; + } + + 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 < listedInstances_.size(); i++) { + output.writeMessage(1, listedInstances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + if (instance_ != null) { + output.writeMessage(3, getInstance()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < listedInstances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, listedInstances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstance()); + } + 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.executor.v1.CloudInstanceResponse)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.CloudInstanceResponse other = + (com.google.spanner.executor.v1.CloudInstanceResponse) obj; + + if (!getListedInstancesList().equals(other.getListedInstancesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance().equals(other.getInstance())) 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 (getListedInstancesCount() > 0) { + hash = (37 * hash) + LISTED_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getListedInstancesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.CloudInstanceResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloudInstanceResponse 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.executor.v1.CloudInstanceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloudInstanceResponse 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.executor.v1.CloudInstanceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CloudInstanceResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.CloudInstanceResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloudInstanceResponse 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.executor.v1.CloudInstanceResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloudInstanceResponse 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.executor.v1.CloudInstanceResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CloudInstanceResponse 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.executor.v1.CloudInstanceResponse 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; + } + /** + * + * + *
+   * CloudInstanceResponse contains results returned by cloud instance related
+   * actions.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CloudInstanceResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CloudInstanceResponse) + com.google.spanner.executor.v1.CloudInstanceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudInstanceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudInstanceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CloudInstanceResponse.class, + com.google.spanner.executor.v1.CloudInstanceResponse.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.CloudInstanceResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (listedInstancesBuilder_ == null) { + listedInstances_ = java.util.Collections.emptyList(); + } else { + listedInstances_ = null; + listedInstancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + instance_ = null; + if (instanceBuilder_ != null) { + instanceBuilder_.dispose(); + instanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CloudInstanceResponse_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloudInstanceResponse getDefaultInstanceForType() { + return com.google.spanner.executor.v1.CloudInstanceResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloudInstanceResponse build() { + com.google.spanner.executor.v1.CloudInstanceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CloudInstanceResponse buildPartial() { + com.google.spanner.executor.v1.CloudInstanceResponse result = + new com.google.spanner.executor.v1.CloudInstanceResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.CloudInstanceResponse result) { + if (listedInstancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + listedInstances_ = java.util.Collections.unmodifiableList(listedInstances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.listedInstances_ = listedInstances_; + } else { + result.listedInstances_ = listedInstancesBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.CloudInstanceResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.instance_ = instanceBuilder_ == null ? instance_ : instanceBuilder_.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.executor.v1.CloudInstanceResponse) { + return mergeFrom((com.google.spanner.executor.v1.CloudInstanceResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.CloudInstanceResponse other) { + if (other == com.google.spanner.executor.v1.CloudInstanceResponse.getDefaultInstance()) + return this; + if (listedInstancesBuilder_ == null) { + if (!other.listedInstances_.isEmpty()) { + if (listedInstances_.isEmpty()) { + listedInstances_ = other.listedInstances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListedInstancesIsMutable(); + listedInstances_.addAll(other.listedInstances_); + } + onChanged(); + } + } else { + if (!other.listedInstances_.isEmpty()) { + if (listedInstancesBuilder_.isEmpty()) { + listedInstancesBuilder_.dispose(); + listedInstancesBuilder_ = null; + listedInstances_ = other.listedInstances_; + bitField0_ = (bitField0_ & ~0x00000001); + listedInstancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getListedInstancesFieldBuilder() + : null; + } else { + listedInstancesBuilder_.addAllMessages(other.listedInstances_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + 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.admin.instance.v1.Instance m = + input.readMessage( + com.google.spanner.admin.instance.v1.Instance.parser(), extensionRegistry); + if (listedInstancesBuilder_ == null) { + ensureListedInstancesIsMutable(); + listedInstances_.add(m); + } else { + listedInstancesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getInstanceFieldBuilder().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 java.util.List listedInstances_ = + java.util.Collections.emptyList(); + + private void ensureListedInstancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + listedInstances_ = + new java.util.ArrayList( + listedInstances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.Instance, + com.google.spanner.admin.instance.v1.Instance.Builder, + com.google.spanner.admin.instance.v1.InstanceOrBuilder> + listedInstancesBuilder_; + + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public java.util.List getListedInstancesList() { + if (listedInstancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(listedInstances_); + } else { + return listedInstancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public int getListedInstancesCount() { + if (listedInstancesBuilder_ == null) { + return listedInstances_.size(); + } else { + return listedInstancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public com.google.spanner.admin.instance.v1.Instance getListedInstances(int index) { + if (listedInstancesBuilder_ == null) { + return listedInstances_.get(index); + } else { + return listedInstancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public Builder setListedInstances( + int index, com.google.spanner.admin.instance.v1.Instance value) { + if (listedInstancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedInstancesIsMutable(); + listedInstances_.set(index, value); + onChanged(); + } else { + listedInstancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public Builder setListedInstances( + int index, com.google.spanner.admin.instance.v1.Instance.Builder builderForValue) { + if (listedInstancesBuilder_ == null) { + ensureListedInstancesIsMutable(); + listedInstances_.set(index, builderForValue.build()); + onChanged(); + } else { + listedInstancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public Builder addListedInstances(com.google.spanner.admin.instance.v1.Instance value) { + if (listedInstancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedInstancesIsMutable(); + listedInstances_.add(value); + onChanged(); + } else { + listedInstancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public Builder addListedInstances( + int index, com.google.spanner.admin.instance.v1.Instance value) { + if (listedInstancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedInstancesIsMutable(); + listedInstances_.add(index, value); + onChanged(); + } else { + listedInstancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public Builder addListedInstances( + com.google.spanner.admin.instance.v1.Instance.Builder builderForValue) { + if (listedInstancesBuilder_ == null) { + ensureListedInstancesIsMutable(); + listedInstances_.add(builderForValue.build()); + onChanged(); + } else { + listedInstancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public Builder addListedInstances( + int index, com.google.spanner.admin.instance.v1.Instance.Builder builderForValue) { + if (listedInstancesBuilder_ == null) { + ensureListedInstancesIsMutable(); + listedInstances_.add(index, builderForValue.build()); + onChanged(); + } else { + listedInstancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public Builder addAllListedInstances( + java.lang.Iterable values) { + if (listedInstancesBuilder_ == null) { + ensureListedInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, listedInstances_); + onChanged(); + } else { + listedInstancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public Builder clearListedInstances() { + if (listedInstancesBuilder_ == null) { + listedInstances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listedInstancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public Builder removeListedInstances(int index) { + if (listedInstancesBuilder_ == null) { + ensureListedInstancesIsMutable(); + listedInstances_.remove(index); + onChanged(); + } else { + listedInstancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public com.google.spanner.admin.instance.v1.Instance.Builder getListedInstancesBuilder( + int index) { + return getListedInstancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public com.google.spanner.admin.instance.v1.InstanceOrBuilder getListedInstancesOrBuilder( + int index) { + if (listedInstancesBuilder_ == null) { + return listedInstances_.get(index); + } else { + return listedInstancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public java.util.List + getListedInstancesOrBuilderList() { + if (listedInstancesBuilder_ != null) { + return listedInstancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(listedInstances_); + } + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public com.google.spanner.admin.instance.v1.Instance.Builder addListedInstancesBuilder() { + return getListedInstancesFieldBuilder() + .addBuilder(com.google.spanner.admin.instance.v1.Instance.getDefaultInstance()); + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public com.google.spanner.admin.instance.v1.Instance.Builder addListedInstancesBuilder( + int index) { + return getListedInstancesFieldBuilder() + .addBuilder(index, com.google.spanner.admin.instance.v1.Instance.getDefaultInstance()); + } + /** + * + * + *
+     * List of instances returned by ListCloudInstancesAction.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + public java.util.List + getListedInstancesBuilderList() { + return getListedInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.Instance, + com.google.spanner.admin.instance.v1.Instance.Builder, + com.google.spanner.admin.instance.v1.InstanceOrBuilder> + getListedInstancesFieldBuilder() { + if (listedInstancesBuilder_ == null) { + listedInstancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.Instance, + com.google.spanner.admin.instance.v1.Instance.Builder, + com.google.spanner.admin.instance.v1.InstanceOrBuilder>( + listedInstances_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + listedInstances_ = null; + } + return listedInstancesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.spanner.admin.instance.v1.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.Instance, + com.google.spanner.admin.instance.v1.Instance.Builder, + com.google.spanner.admin.instance.v1.InstanceOrBuilder> + instanceBuilder_; + /** + * + * + *
+     * Instance returned by GetCloudInstanceAction
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + * + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Instance returned by GetCloudInstanceAction
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + * + * @return The instance. + */ + public com.google.spanner.admin.instance.v1.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null + ? com.google.spanner.admin.instance.v1.Instance.getDefaultInstance() + : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Instance returned by GetCloudInstanceAction
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + */ + public Builder setInstance(com.google.spanner.admin.instance.v1.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + } else { + instanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Instance returned by GetCloudInstanceAction
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + */ + public Builder setInstance( + com.google.spanner.admin.instance.v1.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Instance returned by GetCloudInstanceAction
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + */ + public Builder mergeInstance(com.google.spanner.admin.instance.v1.Instance value) { + if (instanceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && instance_ != null + && instance_ != com.google.spanner.admin.instance.v1.Instance.getDefaultInstance()) { + getInstanceBuilder().mergeFrom(value); + } else { + instance_ = value; + } + } else { + instanceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Instance returned by GetCloudInstanceAction
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + */ + public Builder clearInstance() { + bitField0_ = (bitField0_ & ~0x00000004); + instance_ = null; + if (instanceBuilder_ != null) { + instanceBuilder_.dispose(); + instanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Instance returned by GetCloudInstanceAction
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + */ + public com.google.spanner.admin.instance.v1.Instance.Builder getInstanceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Instance returned by GetCloudInstanceAction
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + */ + public com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null + ? com.google.spanner.admin.instance.v1.Instance.getDefaultInstance() + : instance_; + } + } + /** + * + * + *
+     * Instance returned by GetCloudInstanceAction
+     * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.Instance, + com.google.spanner.admin.instance.v1.Instance.Builder, + com.google.spanner.admin.instance.v1.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.Instance, + com.google.spanner.admin.instance.v1.Instance.Builder, + com.google.spanner.admin.instance.v1.InstanceOrBuilder>( + getInstance(), getParentForChildren(), isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + @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.executor.v1.CloudInstanceResponse) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.CloudInstanceResponse) + private static final com.google.spanner.executor.v1.CloudInstanceResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.CloudInstanceResponse(); + } + + public static com.google.spanner.executor.v1.CloudInstanceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudInstanceResponse 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.executor.v1.CloudInstanceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudInstanceResponseOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudInstanceResponseOrBuilder.java new file mode 100644 index 00000000000..64811c8b29a --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CloudInstanceResponseOrBuilder.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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface CloudInstanceResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CloudInstanceResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of instances returned by ListCloudInstancesAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + java.util.List getListedInstancesList(); + /** + * + * + *
+   * List of instances returned by ListCloudInstancesAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + com.google.spanner.admin.instance.v1.Instance getListedInstances(int index); + /** + * + * + *
+   * List of instances returned by ListCloudInstancesAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + int getListedInstancesCount(); + /** + * + * + *
+   * List of instances returned by ListCloudInstancesAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + java.util.List + getListedInstancesOrBuilderList(); + /** + * + * + *
+   * List of instances returned by ListCloudInstancesAction.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.Instance listed_instances = 1; + */ + com.google.spanner.admin.instance.v1.InstanceOrBuilder getListedInstancesOrBuilder(int index); + + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Instance returned by GetCloudInstanceAction
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * + * + *
+   * Instance returned by GetCloudInstanceAction
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + * + * @return The instance. + */ + com.google.spanner.admin.instance.v1.Instance getInstance(); + /** + * + * + *
+   * Instance returned by GetCloudInstanceAction
+   * 
+ * + * .google.spanner.admin.instance.v1.Instance instance = 3; + */ + com.google.spanner.admin.instance.v1.InstanceOrBuilder getInstanceOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ColumnMetadata.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ColumnMetadata.java new file mode 100644 index 00000000000..da69ce0dd65 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ColumnMetadata.java @@ -0,0 +1,878 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * ColumnMetadata represents metadata of a single column.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ColumnMetadata} + */ +public final class ColumnMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ColumnMetadata) + ColumnMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ColumnMetadata.newBuilder() to construct. + private ColumnMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ColumnMetadata() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ColumnMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ColumnMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ColumnMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ColumnMetadata.class, + com.google.spanner.executor.v1.ColumnMetadata.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Column name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Column name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private com.google.spanner.v1.Type type_; + /** + * + * + *
+   * Column type.
+   * 
+ * + * .google.spanner.v1.Type type = 2; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return type_ != null; + } + /** + * + * + *
+   * Column type.
+   * 
+ * + * .google.spanner.v1.Type type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.spanner.v1.Type getType() { + return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_; + } + /** + * + * + *
+   * Column type.
+   * 
+ * + * .google.spanner.v1.Type type = 2; + */ + @java.lang.Override + public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() { + return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ != null) { + output.writeMessage(2, getType()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (type_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType()); + } + 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.executor.v1.ColumnMetadata)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ColumnMetadata other = + (com.google.spanner.executor.v1.ColumnMetadata) obj; + + if (!getName().equals(other.getName())) return false; + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (!getType().equals(other.getType())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ColumnMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ColumnMetadata 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.executor.v1.ColumnMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ColumnMetadata 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.executor.v1.ColumnMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ColumnMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ColumnMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ColumnMetadata 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.executor.v1.ColumnMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ColumnMetadata 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.executor.v1.ColumnMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ColumnMetadata 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.executor.v1.ColumnMetadata 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; + } + /** + * + * + *
+   * ColumnMetadata represents metadata of a single column.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ColumnMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ColumnMetadata) + com.google.spanner.executor.v1.ColumnMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ColumnMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ColumnMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ColumnMetadata.class, + com.google.spanner.executor.v1.ColumnMetadata.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ColumnMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ColumnMetadata_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ColumnMetadata getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ColumnMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ColumnMetadata build() { + com.google.spanner.executor.v1.ColumnMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ColumnMetadata buildPartial() { + com.google.spanner.executor.v1.ColumnMetadata result = + new com.google.spanner.executor.v1.ColumnMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.ColumnMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = typeBuilder_ == null ? type_ : typeBuilder_.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.executor.v1.ColumnMetadata) { + return mergeFrom((com.google.spanner.executor.v1.ColumnMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ColumnMetadata other) { + if (other == com.google.spanner.executor.v1.ColumnMetadata.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasType()) { + mergeType(other.getType()); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 name_ = ""; + /** + * + * + *
+     * Column name.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Column name.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Column name.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Column name.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Column name.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.spanner.v1.Type type_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder> + typeBuilder_; + /** + * + * + *
+     * Column type.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + * + * @return Whether the type field is set. + */ + public boolean hasType() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Column type.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + * + * @return The type. + */ + public com.google.spanner.v1.Type getType() { + if (typeBuilder_ == null) { + return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_; + } else { + return typeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Column type.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + */ + public Builder setType(com.google.spanner.v1.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + } else { + typeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Column type.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + */ + public Builder setType(com.google.spanner.v1.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + type_ = builderForValue.build(); + } else { + typeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Column type.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + */ + public Builder mergeType(com.google.spanner.v1.Type value) { + if (typeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && type_ != null + && type_ != com.google.spanner.v1.Type.getDefaultInstance()) { + getTypeBuilder().mergeFrom(value); + } else { + type_ = value; + } + } else { + typeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Column type.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Column type.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.Type.Builder getTypeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTypeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Column type.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() { + if (typeBuilder_ != null) { + return typeBuilder_.getMessageOrBuilder(); + } else { + return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_; + } + } + /** + * + * + *
+     * Column type.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder> + getTypeFieldBuilder() { + if (typeBuilder_ == null) { + typeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder>(getType(), getParentForChildren(), isClean()); + type_ = null; + } + return typeBuilder_; + } + + @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.executor.v1.ColumnMetadata) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ColumnMetadata) + private static final com.google.spanner.executor.v1.ColumnMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ColumnMetadata(); + } + + public static com.google.spanner.executor.v1.ColumnMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ColumnMetadata 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.executor.v1.ColumnMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ColumnMetadataOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ColumnMetadataOrBuilder.java new file mode 100644 index 00000000000..43a8ddc31fb --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ColumnMetadataOrBuilder.java @@ -0,0 +1,85 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ColumnMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ColumnMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Column name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Column name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Column type.
+   * 
+ * + * .google.spanner.v1.Type type = 2; + * + * @return Whether the type field is set. + */ + boolean hasType(); + /** + * + * + *
+   * Column type.
+   * 
+ * + * .google.spanner.v1.Type type = 2; + * + * @return The type. + */ + com.google.spanner.v1.Type getType(); + /** + * + * + *
+   * Column type.
+   * 
+ * + * .google.spanner.v1.Type type = 2; + */ + com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/Concurrency.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/Concurrency.java new file mode 100644 index 00000000000..8660df865c9 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/Concurrency.java @@ -0,0 +1,1731 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Concurrency for read-only transactions.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.Concurrency} + */ +public final class Concurrency extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.Concurrency) + ConcurrencyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Concurrency.newBuilder() to construct. + private Concurrency(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Concurrency() { + snapshotEpochRootTable_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Concurrency(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_Concurrency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_Concurrency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.Concurrency.class, + com.google.spanner.executor.v1.Concurrency.Builder.class); + } + + private int concurrencyModeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object concurrencyMode_; + + public enum ConcurrencyModeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STALENESS_SECONDS(1), + MIN_READ_TIMESTAMP_MICROS(2), + MAX_STALENESS_SECONDS(3), + EXACT_TIMESTAMP_MICROS(4), + STRONG(5), + BATCH(6), + CONCURRENCYMODE_NOT_SET(0); + private final int value; + + private ConcurrencyModeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConcurrencyModeCase valueOf(int value) { + return forNumber(value); + } + + public static ConcurrencyModeCase forNumber(int value) { + switch (value) { + case 1: + return STALENESS_SECONDS; + case 2: + return MIN_READ_TIMESTAMP_MICROS; + case 3: + return MAX_STALENESS_SECONDS; + case 4: + return EXACT_TIMESTAMP_MICROS; + case 5: + return STRONG; + case 6: + return BATCH; + case 0: + return CONCURRENCYMODE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConcurrencyModeCase getConcurrencyModeCase() { + return ConcurrencyModeCase.forNumber(concurrencyModeCase_); + } + + public static final int STALENESS_SECONDS_FIELD_NUMBER = 1; + /** + * + * + *
+   * Indicates a read at a consistent timestamp that is specified relative to
+   * now. That is, if the caller has specified an exact staleness of s
+   * seconds, we will read at now - s.
+   * 
+ * + * double staleness_seconds = 1; + * + * @return Whether the stalenessSeconds field is set. + */ + @java.lang.Override + public boolean hasStalenessSeconds() { + return concurrencyModeCase_ == 1; + } + /** + * + * + *
+   * Indicates a read at a consistent timestamp that is specified relative to
+   * now. That is, if the caller has specified an exact staleness of s
+   * seconds, we will read at now - s.
+   * 
+ * + * double staleness_seconds = 1; + * + * @return The stalenessSeconds. + */ + @java.lang.Override + public double getStalenessSeconds() { + if (concurrencyModeCase_ == 1) { + return (java.lang.Double) concurrencyMode_; + } + return 0D; + } + + public static final int MIN_READ_TIMESTAMP_MICROS_FIELD_NUMBER = 2; + /** + * + * + *
+   * Indicates a boundedly stale read that reads at a timestamp >= T.
+   * 
+ * + * int64 min_read_timestamp_micros = 2; + * + * @return Whether the minReadTimestampMicros field is set. + */ + @java.lang.Override + public boolean hasMinReadTimestampMicros() { + return concurrencyModeCase_ == 2; + } + /** + * + * + *
+   * Indicates a boundedly stale read that reads at a timestamp >= T.
+   * 
+ * + * int64 min_read_timestamp_micros = 2; + * + * @return The minReadTimestampMicros. + */ + @java.lang.Override + public long getMinReadTimestampMicros() { + if (concurrencyModeCase_ == 2) { + return (java.lang.Long) concurrencyMode_; + } + return 0L; + } + + public static final int MAX_STALENESS_SECONDS_FIELD_NUMBER = 3; + /** + * + * + *
+   * Indicates a boundedly stale read that is at most N seconds stale.
+   * 
+ * + * double max_staleness_seconds = 3; + * + * @return Whether the maxStalenessSeconds field is set. + */ + @java.lang.Override + public boolean hasMaxStalenessSeconds() { + return concurrencyModeCase_ == 3; + } + /** + * + * + *
+   * Indicates a boundedly stale read that is at most N seconds stale.
+   * 
+ * + * double max_staleness_seconds = 3; + * + * @return The maxStalenessSeconds. + */ + @java.lang.Override + public double getMaxStalenessSeconds() { + if (concurrencyModeCase_ == 3) { + return (java.lang.Double) concurrencyMode_; + } + return 0D; + } + + public static final int EXACT_TIMESTAMP_MICROS_FIELD_NUMBER = 4; + /** + * + * + *
+   * Indicates a read at a consistent timestamp.
+   * 
+ * + * int64 exact_timestamp_micros = 4; + * + * @return Whether the exactTimestampMicros field is set. + */ + @java.lang.Override + public boolean hasExactTimestampMicros() { + return concurrencyModeCase_ == 4; + } + /** + * + * + *
+   * Indicates a read at a consistent timestamp.
+   * 
+ * + * int64 exact_timestamp_micros = 4; + * + * @return The exactTimestampMicros. + */ + @java.lang.Override + public long getExactTimestampMicros() { + if (concurrencyModeCase_ == 4) { + return (java.lang.Long) concurrencyMode_; + } + return 0L; + } + + public static final int STRONG_FIELD_NUMBER = 5; + /** + * + * + *
+   * Indicates a strong read, must only be set to true, or unset.
+   * 
+ * + * bool strong = 5; + * + * @return Whether the strong field is set. + */ + @java.lang.Override + public boolean hasStrong() { + return concurrencyModeCase_ == 5; + } + /** + * + * + *
+   * Indicates a strong read, must only be set to true, or unset.
+   * 
+ * + * bool strong = 5; + * + * @return The strong. + */ + @java.lang.Override + public boolean getStrong() { + if (concurrencyModeCase_ == 5) { + return (java.lang.Boolean) concurrencyMode_; + } + return false; + } + + public static final int BATCH_FIELD_NUMBER = 6; + /** + * + * + *
+   * Indicates a batch read, must only be set to true, or unset.
+   * 
+ * + * bool batch = 6; + * + * @return Whether the batch field is set. + */ + @java.lang.Override + public boolean hasBatch() { + return concurrencyModeCase_ == 6; + } + /** + * + * + *
+   * Indicates a batch read, must only be set to true, or unset.
+   * 
+ * + * bool batch = 6; + * + * @return The batch. + */ + @java.lang.Override + public boolean getBatch() { + if (concurrencyModeCase_ == 6) { + return (java.lang.Boolean) concurrencyMode_; + } + return false; + } + + public static final int SNAPSHOT_EPOCH_READ_FIELD_NUMBER = 7; + private boolean snapshotEpochRead_ = false; + /** + * + * + *
+   * True if exact_timestamp_micros is set, and the chosen timestamp is that of
+   * a snapshot epoch.
+   * 
+ * + * bool snapshot_epoch_read = 7; + * + * @return The snapshotEpochRead. + */ + @java.lang.Override + public boolean getSnapshotEpochRead() { + return snapshotEpochRead_; + } + + public static final int SNAPSHOT_EPOCH_ROOT_TABLE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object snapshotEpochRootTable_ = ""; + /** + * + * + *
+   * If set, this is a snapshot epoch read constrained to read only the
+   * specified log scope root table, and its children. Will not be set for full
+   * database epochs.
+   * 
+ * + * string snapshot_epoch_root_table = 8; + * + * @return The snapshotEpochRootTable. + */ + @java.lang.Override + public java.lang.String getSnapshotEpochRootTable() { + java.lang.Object ref = snapshotEpochRootTable_; + 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(); + snapshotEpochRootTable_ = s; + return s; + } + } + /** + * + * + *
+   * If set, this is a snapshot epoch read constrained to read only the
+   * specified log scope root table, and its children. Will not be set for full
+   * database epochs.
+   * 
+ * + * string snapshot_epoch_root_table = 8; + * + * @return The bytes for snapshotEpochRootTable. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSnapshotEpochRootTableBytes() { + java.lang.Object ref = snapshotEpochRootTable_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snapshotEpochRootTable_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BATCH_READ_TIMESTAMP_MICROS_FIELD_NUMBER = 9; + private long batchReadTimestampMicros_ = 0L; + /** + * + * + *
+   * Set only when batch is true.
+   * 
+ * + * int64 batch_read_timestamp_micros = 9; + * + * @return The batchReadTimestampMicros. + */ + @java.lang.Override + public long getBatchReadTimestampMicros() { + return batchReadTimestampMicros_; + } + + 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 (concurrencyModeCase_ == 1) { + output.writeDouble(1, (double) ((java.lang.Double) concurrencyMode_)); + } + if (concurrencyModeCase_ == 2) { + output.writeInt64(2, (long) ((java.lang.Long) concurrencyMode_)); + } + if (concurrencyModeCase_ == 3) { + output.writeDouble(3, (double) ((java.lang.Double) concurrencyMode_)); + } + if (concurrencyModeCase_ == 4) { + output.writeInt64(4, (long) ((java.lang.Long) concurrencyMode_)); + } + if (concurrencyModeCase_ == 5) { + output.writeBool(5, (boolean) ((java.lang.Boolean) concurrencyMode_)); + } + if (concurrencyModeCase_ == 6) { + output.writeBool(6, (boolean) ((java.lang.Boolean) concurrencyMode_)); + } + if (snapshotEpochRead_ != false) { + output.writeBool(7, snapshotEpochRead_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshotEpochRootTable_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, snapshotEpochRootTable_); + } + if (batchReadTimestampMicros_ != 0L) { + output.writeInt64(9, batchReadTimestampMicros_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (concurrencyModeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 1, (double) ((java.lang.Double) concurrencyMode_)); + } + if (concurrencyModeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 2, (long) ((java.lang.Long) concurrencyMode_)); + } + if (concurrencyModeCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 3, (double) ((java.lang.Double) concurrencyMode_)); + } + if (concurrencyModeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 4, (long) ((java.lang.Long) concurrencyMode_)); + } + if (concurrencyModeCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 5, (boolean) ((java.lang.Boolean) concurrencyMode_)); + } + if (concurrencyModeCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 6, (boolean) ((java.lang.Boolean) concurrencyMode_)); + } + if (snapshotEpochRead_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, snapshotEpochRead_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshotEpochRootTable_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, snapshotEpochRootTable_); + } + if (batchReadTimestampMicros_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, batchReadTimestampMicros_); + } + 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.executor.v1.Concurrency)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.Concurrency other = + (com.google.spanner.executor.v1.Concurrency) obj; + + if (getSnapshotEpochRead() != other.getSnapshotEpochRead()) return false; + if (!getSnapshotEpochRootTable().equals(other.getSnapshotEpochRootTable())) return false; + if (getBatchReadTimestampMicros() != other.getBatchReadTimestampMicros()) return false; + if (!getConcurrencyModeCase().equals(other.getConcurrencyModeCase())) return false; + switch (concurrencyModeCase_) { + case 1: + if (java.lang.Double.doubleToLongBits(getStalenessSeconds()) + != java.lang.Double.doubleToLongBits(other.getStalenessSeconds())) return false; + break; + case 2: + if (getMinReadTimestampMicros() != other.getMinReadTimestampMicros()) return false; + break; + case 3: + if (java.lang.Double.doubleToLongBits(getMaxStalenessSeconds()) + != java.lang.Double.doubleToLongBits(other.getMaxStalenessSeconds())) return false; + break; + case 4: + if (getExactTimestampMicros() != other.getExactTimestampMicros()) return false; + break; + case 5: + if (getStrong() != other.getStrong()) return false; + break; + case 6: + if (getBatch() != other.getBatch()) return false; + break; + case 0: + default: + } + 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) + SNAPSHOT_EPOCH_READ_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSnapshotEpochRead()); + hash = (37 * hash) + SNAPSHOT_EPOCH_ROOT_TABLE_FIELD_NUMBER; + hash = (53 * hash) + getSnapshotEpochRootTable().hashCode(); + hash = (37 * hash) + BATCH_READ_TIMESTAMP_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBatchReadTimestampMicros()); + switch (concurrencyModeCase_) { + case 1: + hash = (37 * hash) + STALENESS_SECONDS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getStalenessSeconds())); + break; + case 2: + hash = (37 * hash) + MIN_READ_TIMESTAMP_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinReadTimestampMicros()); + break; + case 3: + hash = (37 * hash) + MAX_STALENESS_SECONDS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaxStalenessSeconds())); + break; + case 4: + hash = (37 * hash) + EXACT_TIMESTAMP_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getExactTimestampMicros()); + break; + case 5: + hash = (37 * hash) + STRONG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStrong()); + break; + case 6: + hash = (37 * hash) + BATCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBatch()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.Concurrency parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.Concurrency 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.executor.v1.Concurrency parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.Concurrency 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.executor.v1.Concurrency parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.Concurrency parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.Concurrency parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.Concurrency 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.executor.v1.Concurrency parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.Concurrency 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.executor.v1.Concurrency parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.Concurrency 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.executor.v1.Concurrency 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; + } + /** + * + * + *
+   * Concurrency for read-only transactions.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.Concurrency} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.Concurrency) + com.google.spanner.executor.v1.ConcurrencyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_Concurrency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_Concurrency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.Concurrency.class, + com.google.spanner.executor.v1.Concurrency.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.Concurrency.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + snapshotEpochRead_ = false; + snapshotEpochRootTable_ = ""; + batchReadTimestampMicros_ = 0L; + concurrencyModeCase_ = 0; + concurrencyMode_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_Concurrency_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.Concurrency getDefaultInstanceForType() { + return com.google.spanner.executor.v1.Concurrency.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.Concurrency build() { + com.google.spanner.executor.v1.Concurrency result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.Concurrency buildPartial() { + com.google.spanner.executor.v1.Concurrency result = + new com.google.spanner.executor.v1.Concurrency(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.Concurrency result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.snapshotEpochRead_ = snapshotEpochRead_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.snapshotEpochRootTable_ = snapshotEpochRootTable_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.batchReadTimestampMicros_ = batchReadTimestampMicros_; + } + } + + private void buildPartialOneofs(com.google.spanner.executor.v1.Concurrency result) { + result.concurrencyModeCase_ = concurrencyModeCase_; + result.concurrencyMode_ = this.concurrencyMode_; + } + + @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.executor.v1.Concurrency) { + return mergeFrom((com.google.spanner.executor.v1.Concurrency) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.Concurrency other) { + if (other == com.google.spanner.executor.v1.Concurrency.getDefaultInstance()) return this; + if (other.getSnapshotEpochRead() != false) { + setSnapshotEpochRead(other.getSnapshotEpochRead()); + } + if (!other.getSnapshotEpochRootTable().isEmpty()) { + snapshotEpochRootTable_ = other.snapshotEpochRootTable_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.getBatchReadTimestampMicros() != 0L) { + setBatchReadTimestampMicros(other.getBatchReadTimestampMicros()); + } + switch (other.getConcurrencyModeCase()) { + case STALENESS_SECONDS: + { + setStalenessSeconds(other.getStalenessSeconds()); + break; + } + case MIN_READ_TIMESTAMP_MICROS: + { + setMinReadTimestampMicros(other.getMinReadTimestampMicros()); + break; + } + case MAX_STALENESS_SECONDS: + { + setMaxStalenessSeconds(other.getMaxStalenessSeconds()); + break; + } + case EXACT_TIMESTAMP_MICROS: + { + setExactTimestampMicros(other.getExactTimestampMicros()); + break; + } + case STRONG: + { + setStrong(other.getStrong()); + break; + } + case BATCH: + { + setBatch(other.getBatch()); + break; + } + case CONCURRENCYMODE_NOT_SET: + { + break; + } + } + 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 9: + { + concurrencyMode_ = input.readDouble(); + concurrencyModeCase_ = 1; + break; + } // case 9 + case 16: + { + concurrencyMode_ = input.readInt64(); + concurrencyModeCase_ = 2; + break; + } // case 16 + case 25: + { + concurrencyMode_ = input.readDouble(); + concurrencyModeCase_ = 3; + break; + } // case 25 + case 32: + { + concurrencyMode_ = input.readInt64(); + concurrencyModeCase_ = 4; + break; + } // case 32 + case 40: + { + concurrencyMode_ = input.readBool(); + concurrencyModeCase_ = 5; + break; + } // case 40 + case 48: + { + concurrencyMode_ = input.readBool(); + concurrencyModeCase_ = 6; + break; + } // case 48 + case 56: + { + snapshotEpochRead_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + snapshotEpochRootTable_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + batchReadTimestampMicros_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 72 + 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 concurrencyModeCase_ = 0; + private java.lang.Object concurrencyMode_; + + public ConcurrencyModeCase getConcurrencyModeCase() { + return ConcurrencyModeCase.forNumber(concurrencyModeCase_); + } + + public Builder clearConcurrencyMode() { + concurrencyModeCase_ = 0; + concurrencyMode_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Indicates a read at a consistent timestamp that is specified relative to
+     * now. That is, if the caller has specified an exact staleness of s
+     * seconds, we will read at now - s.
+     * 
+ * + * double staleness_seconds = 1; + * + * @return Whether the stalenessSeconds field is set. + */ + public boolean hasStalenessSeconds() { + return concurrencyModeCase_ == 1; + } + /** + * + * + *
+     * Indicates a read at a consistent timestamp that is specified relative to
+     * now. That is, if the caller has specified an exact staleness of s
+     * seconds, we will read at now - s.
+     * 
+ * + * double staleness_seconds = 1; + * + * @return The stalenessSeconds. + */ + public double getStalenessSeconds() { + if (concurrencyModeCase_ == 1) { + return (java.lang.Double) concurrencyMode_; + } + return 0D; + } + /** + * + * + *
+     * Indicates a read at a consistent timestamp that is specified relative to
+     * now. That is, if the caller has specified an exact staleness of s
+     * seconds, we will read at now - s.
+     * 
+ * + * double staleness_seconds = 1; + * + * @param value The stalenessSeconds to set. + * @return This builder for chaining. + */ + public Builder setStalenessSeconds(double value) { + + concurrencyModeCase_ = 1; + concurrencyMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates a read at a consistent timestamp that is specified relative to
+     * now. That is, if the caller has specified an exact staleness of s
+     * seconds, we will read at now - s.
+     * 
+ * + * double staleness_seconds = 1; + * + * @return This builder for chaining. + */ + public Builder clearStalenessSeconds() { + if (concurrencyModeCase_ == 1) { + concurrencyModeCase_ = 0; + concurrencyMode_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Indicates a boundedly stale read that reads at a timestamp >= T.
+     * 
+ * + * int64 min_read_timestamp_micros = 2; + * + * @return Whether the minReadTimestampMicros field is set. + */ + public boolean hasMinReadTimestampMicros() { + return concurrencyModeCase_ == 2; + } + /** + * + * + *
+     * Indicates a boundedly stale read that reads at a timestamp >= T.
+     * 
+ * + * int64 min_read_timestamp_micros = 2; + * + * @return The minReadTimestampMicros. + */ + public long getMinReadTimestampMicros() { + if (concurrencyModeCase_ == 2) { + return (java.lang.Long) concurrencyMode_; + } + return 0L; + } + /** + * + * + *
+     * Indicates a boundedly stale read that reads at a timestamp >= T.
+     * 
+ * + * int64 min_read_timestamp_micros = 2; + * + * @param value The minReadTimestampMicros to set. + * @return This builder for chaining. + */ + public Builder setMinReadTimestampMicros(long value) { + + concurrencyModeCase_ = 2; + concurrencyMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates a boundedly stale read that reads at a timestamp >= T.
+     * 
+ * + * int64 min_read_timestamp_micros = 2; + * + * @return This builder for chaining. + */ + public Builder clearMinReadTimestampMicros() { + if (concurrencyModeCase_ == 2) { + concurrencyModeCase_ = 0; + concurrencyMode_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Indicates a boundedly stale read that is at most N seconds stale.
+     * 
+ * + * double max_staleness_seconds = 3; + * + * @return Whether the maxStalenessSeconds field is set. + */ + public boolean hasMaxStalenessSeconds() { + return concurrencyModeCase_ == 3; + } + /** + * + * + *
+     * Indicates a boundedly stale read that is at most N seconds stale.
+     * 
+ * + * double max_staleness_seconds = 3; + * + * @return The maxStalenessSeconds. + */ + public double getMaxStalenessSeconds() { + if (concurrencyModeCase_ == 3) { + return (java.lang.Double) concurrencyMode_; + } + return 0D; + } + /** + * + * + *
+     * Indicates a boundedly stale read that is at most N seconds stale.
+     * 
+ * + * double max_staleness_seconds = 3; + * + * @param value The maxStalenessSeconds to set. + * @return This builder for chaining. + */ + public Builder setMaxStalenessSeconds(double value) { + + concurrencyModeCase_ = 3; + concurrencyMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates a boundedly stale read that is at most N seconds stale.
+     * 
+ * + * double max_staleness_seconds = 3; + * + * @return This builder for chaining. + */ + public Builder clearMaxStalenessSeconds() { + if (concurrencyModeCase_ == 3) { + concurrencyModeCase_ = 0; + concurrencyMode_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Indicates a read at a consistent timestamp.
+     * 
+ * + * int64 exact_timestamp_micros = 4; + * + * @return Whether the exactTimestampMicros field is set. + */ + public boolean hasExactTimestampMicros() { + return concurrencyModeCase_ == 4; + } + /** + * + * + *
+     * Indicates a read at a consistent timestamp.
+     * 
+ * + * int64 exact_timestamp_micros = 4; + * + * @return The exactTimestampMicros. + */ + public long getExactTimestampMicros() { + if (concurrencyModeCase_ == 4) { + return (java.lang.Long) concurrencyMode_; + } + return 0L; + } + /** + * + * + *
+     * Indicates a read at a consistent timestamp.
+     * 
+ * + * int64 exact_timestamp_micros = 4; + * + * @param value The exactTimestampMicros to set. + * @return This builder for chaining. + */ + public Builder setExactTimestampMicros(long value) { + + concurrencyModeCase_ = 4; + concurrencyMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates a read at a consistent timestamp.
+     * 
+ * + * int64 exact_timestamp_micros = 4; + * + * @return This builder for chaining. + */ + public Builder clearExactTimestampMicros() { + if (concurrencyModeCase_ == 4) { + concurrencyModeCase_ = 0; + concurrencyMode_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Indicates a strong read, must only be set to true, or unset.
+     * 
+ * + * bool strong = 5; + * + * @return Whether the strong field is set. + */ + public boolean hasStrong() { + return concurrencyModeCase_ == 5; + } + /** + * + * + *
+     * Indicates a strong read, must only be set to true, or unset.
+     * 
+ * + * bool strong = 5; + * + * @return The strong. + */ + public boolean getStrong() { + if (concurrencyModeCase_ == 5) { + return (java.lang.Boolean) concurrencyMode_; + } + return false; + } + /** + * + * + *
+     * Indicates a strong read, must only be set to true, or unset.
+     * 
+ * + * bool strong = 5; + * + * @param value The strong to set. + * @return This builder for chaining. + */ + public Builder setStrong(boolean value) { + + concurrencyModeCase_ = 5; + concurrencyMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates a strong read, must only be set to true, or unset.
+     * 
+ * + * bool strong = 5; + * + * @return This builder for chaining. + */ + public Builder clearStrong() { + if (concurrencyModeCase_ == 5) { + concurrencyModeCase_ = 0; + concurrencyMode_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Indicates a batch read, must only be set to true, or unset.
+     * 
+ * + * bool batch = 6; + * + * @return Whether the batch field is set. + */ + public boolean hasBatch() { + return concurrencyModeCase_ == 6; + } + /** + * + * + *
+     * Indicates a batch read, must only be set to true, or unset.
+     * 
+ * + * bool batch = 6; + * + * @return The batch. + */ + public boolean getBatch() { + if (concurrencyModeCase_ == 6) { + return (java.lang.Boolean) concurrencyMode_; + } + return false; + } + /** + * + * + *
+     * Indicates a batch read, must only be set to true, or unset.
+     * 
+ * + * bool batch = 6; + * + * @param value The batch to set. + * @return This builder for chaining. + */ + public Builder setBatch(boolean value) { + + concurrencyModeCase_ = 6; + concurrencyMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates a batch read, must only be set to true, or unset.
+     * 
+ * + * bool batch = 6; + * + * @return This builder for chaining. + */ + public Builder clearBatch() { + if (concurrencyModeCase_ == 6) { + concurrencyModeCase_ = 0; + concurrencyMode_ = null; + onChanged(); + } + return this; + } + + private boolean snapshotEpochRead_; + /** + * + * + *
+     * True if exact_timestamp_micros is set, and the chosen timestamp is that of
+     * a snapshot epoch.
+     * 
+ * + * bool snapshot_epoch_read = 7; + * + * @return The snapshotEpochRead. + */ + @java.lang.Override + public boolean getSnapshotEpochRead() { + return snapshotEpochRead_; + } + /** + * + * + *
+     * True if exact_timestamp_micros is set, and the chosen timestamp is that of
+     * a snapshot epoch.
+     * 
+ * + * bool snapshot_epoch_read = 7; + * + * @param value The snapshotEpochRead to set. + * @return This builder for chaining. + */ + public Builder setSnapshotEpochRead(boolean value) { + + snapshotEpochRead_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * True if exact_timestamp_micros is set, and the chosen timestamp is that of
+     * a snapshot epoch.
+     * 
+ * + * bool snapshot_epoch_read = 7; + * + * @return This builder for chaining. + */ + public Builder clearSnapshotEpochRead() { + bitField0_ = (bitField0_ & ~0x00000040); + snapshotEpochRead_ = false; + onChanged(); + return this; + } + + private java.lang.Object snapshotEpochRootTable_ = ""; + /** + * + * + *
+     * If set, this is a snapshot epoch read constrained to read only the
+     * specified log scope root table, and its children. Will not be set for full
+     * database epochs.
+     * 
+ * + * string snapshot_epoch_root_table = 8; + * + * @return The snapshotEpochRootTable. + */ + public java.lang.String getSnapshotEpochRootTable() { + java.lang.Object ref = snapshotEpochRootTable_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + snapshotEpochRootTable_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If set, this is a snapshot epoch read constrained to read only the
+     * specified log scope root table, and its children. Will not be set for full
+     * database epochs.
+     * 
+ * + * string snapshot_epoch_root_table = 8; + * + * @return The bytes for snapshotEpochRootTable. + */ + public com.google.protobuf.ByteString getSnapshotEpochRootTableBytes() { + java.lang.Object ref = snapshotEpochRootTable_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snapshotEpochRootTable_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If set, this is a snapshot epoch read constrained to read only the
+     * specified log scope root table, and its children. Will not be set for full
+     * database epochs.
+     * 
+ * + * string snapshot_epoch_root_table = 8; + * + * @param value The snapshotEpochRootTable to set. + * @return This builder for chaining. + */ + public Builder setSnapshotEpochRootTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + snapshotEpochRootTable_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, this is a snapshot epoch read constrained to read only the
+     * specified log scope root table, and its children. Will not be set for full
+     * database epochs.
+     * 
+ * + * string snapshot_epoch_root_table = 8; + * + * @return This builder for chaining. + */ + public Builder clearSnapshotEpochRootTable() { + snapshotEpochRootTable_ = getDefaultInstance().getSnapshotEpochRootTable(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * If set, this is a snapshot epoch read constrained to read only the
+     * specified log scope root table, and its children. Will not be set for full
+     * database epochs.
+     * 
+ * + * string snapshot_epoch_root_table = 8; + * + * @param value The bytes for snapshotEpochRootTable to set. + * @return This builder for chaining. + */ + public Builder setSnapshotEpochRootTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + snapshotEpochRootTable_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private long batchReadTimestampMicros_; + /** + * + * + *
+     * Set only when batch is true.
+     * 
+ * + * int64 batch_read_timestamp_micros = 9; + * + * @return The batchReadTimestampMicros. + */ + @java.lang.Override + public long getBatchReadTimestampMicros() { + return batchReadTimestampMicros_; + } + /** + * + * + *
+     * Set only when batch is true.
+     * 
+ * + * int64 batch_read_timestamp_micros = 9; + * + * @param value The batchReadTimestampMicros to set. + * @return This builder for chaining. + */ + public Builder setBatchReadTimestampMicros(long value) { + + batchReadTimestampMicros_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Set only when batch is true.
+     * 
+ * + * int64 batch_read_timestamp_micros = 9; + * + * @return This builder for chaining. + */ + public Builder clearBatchReadTimestampMicros() { + bitField0_ = (bitField0_ & ~0x00000100); + batchReadTimestampMicros_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.Concurrency) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.Concurrency) + private static final com.google.spanner.executor.v1.Concurrency DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.Concurrency(); + } + + public static com.google.spanner.executor.v1.Concurrency getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Concurrency 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.executor.v1.Concurrency getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ConcurrencyOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ConcurrencyOrBuilder.java new file mode 100644 index 00000000000..fbed2003495 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ConcurrencyOrBuilder.java @@ -0,0 +1,237 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ConcurrencyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.Concurrency) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Indicates a read at a consistent timestamp that is specified relative to
+   * now. That is, if the caller has specified an exact staleness of s
+   * seconds, we will read at now - s.
+   * 
+ * + * double staleness_seconds = 1; + * + * @return Whether the stalenessSeconds field is set. + */ + boolean hasStalenessSeconds(); + /** + * + * + *
+   * Indicates a read at a consistent timestamp that is specified relative to
+   * now. That is, if the caller has specified an exact staleness of s
+   * seconds, we will read at now - s.
+   * 
+ * + * double staleness_seconds = 1; + * + * @return The stalenessSeconds. + */ + double getStalenessSeconds(); + + /** + * + * + *
+   * Indicates a boundedly stale read that reads at a timestamp >= T.
+   * 
+ * + * int64 min_read_timestamp_micros = 2; + * + * @return Whether the minReadTimestampMicros field is set. + */ + boolean hasMinReadTimestampMicros(); + /** + * + * + *
+   * Indicates a boundedly stale read that reads at a timestamp >= T.
+   * 
+ * + * int64 min_read_timestamp_micros = 2; + * + * @return The minReadTimestampMicros. + */ + long getMinReadTimestampMicros(); + + /** + * + * + *
+   * Indicates a boundedly stale read that is at most N seconds stale.
+   * 
+ * + * double max_staleness_seconds = 3; + * + * @return Whether the maxStalenessSeconds field is set. + */ + boolean hasMaxStalenessSeconds(); + /** + * + * + *
+   * Indicates a boundedly stale read that is at most N seconds stale.
+   * 
+ * + * double max_staleness_seconds = 3; + * + * @return The maxStalenessSeconds. + */ + double getMaxStalenessSeconds(); + + /** + * + * + *
+   * Indicates a read at a consistent timestamp.
+   * 
+ * + * int64 exact_timestamp_micros = 4; + * + * @return Whether the exactTimestampMicros field is set. + */ + boolean hasExactTimestampMicros(); + /** + * + * + *
+   * Indicates a read at a consistent timestamp.
+   * 
+ * + * int64 exact_timestamp_micros = 4; + * + * @return The exactTimestampMicros. + */ + long getExactTimestampMicros(); + + /** + * + * + *
+   * Indicates a strong read, must only be set to true, or unset.
+   * 
+ * + * bool strong = 5; + * + * @return Whether the strong field is set. + */ + boolean hasStrong(); + /** + * + * + *
+   * Indicates a strong read, must only be set to true, or unset.
+   * 
+ * + * bool strong = 5; + * + * @return The strong. + */ + boolean getStrong(); + + /** + * + * + *
+   * Indicates a batch read, must only be set to true, or unset.
+   * 
+ * + * bool batch = 6; + * + * @return Whether the batch field is set. + */ + boolean hasBatch(); + /** + * + * + *
+   * Indicates a batch read, must only be set to true, or unset.
+   * 
+ * + * bool batch = 6; + * + * @return The batch. + */ + boolean getBatch(); + + /** + * + * + *
+   * True if exact_timestamp_micros is set, and the chosen timestamp is that of
+   * a snapshot epoch.
+   * 
+ * + * bool snapshot_epoch_read = 7; + * + * @return The snapshotEpochRead. + */ + boolean getSnapshotEpochRead(); + + /** + * + * + *
+   * If set, this is a snapshot epoch read constrained to read only the
+   * specified log scope root table, and its children. Will not be set for full
+   * database epochs.
+   * 
+ * + * string snapshot_epoch_root_table = 8; + * + * @return The snapshotEpochRootTable. + */ + java.lang.String getSnapshotEpochRootTable(); + /** + * + * + *
+   * If set, this is a snapshot epoch read constrained to read only the
+   * specified log scope root table, and its children. Will not be set for full
+   * database epochs.
+   * 
+ * + * string snapshot_epoch_root_table = 8; + * + * @return The bytes for snapshotEpochRootTable. + */ + com.google.protobuf.ByteString getSnapshotEpochRootTableBytes(); + + /** + * + * + *
+   * Set only when batch is true.
+   * 
+ * + * int64 batch_read_timestamp_micros = 9; + * + * @return The batchReadTimestampMicros. + */ + long getBatchReadTimestampMicros(); + + com.google.spanner.executor.v1.Concurrency.ConcurrencyModeCase getConcurrencyModeCase(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CopyCloudBackupAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CopyCloudBackupAction.java new file mode 100644 index 00000000000..2a9a2c39648 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CopyCloudBackupAction.java @@ -0,0 +1,1477 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that copies a Cloud Spanner database backup.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CopyCloudBackupAction} + */ +public final class CopyCloudBackupAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CopyCloudBackupAction) + CopyCloudBackupActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CopyCloudBackupAction.newBuilder() to construct. + private CopyCloudBackupAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CopyCloudBackupAction() { + projectId_ = ""; + instanceId_ = ""; + backupId_ = ""; + sourceBackup_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CopyCloudBackupAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CopyCloudBackupAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CopyCloudBackupAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CopyCloudBackupAction.class, + com.google.spanner.executor.v1.CopyCloudBackupAction.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupId_ = ""; + /** + * + * + *
+   * The id of the backup to be created, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + @java.lang.Override + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + 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(); + backupId_ = s; + return s; + } + } + /** + * + * + *
+   * The id of the backup to be created, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_BACKUP_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceBackup_ = ""; + /** + * + * + *
+   * The fully qualified uri of the source backup from which this
+   * backup was copied. eg.
+   * "projects/<project_id>/instances/<instance_id>/backups/<backup_id>".
+   * 
+ * + * string source_backup = 4; + * + * @return The sourceBackup. + */ + @java.lang.Override + public java.lang.String getSourceBackup() { + java.lang.Object ref = sourceBackup_; + 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(); + sourceBackup_ = s; + return s; + } + } + /** + * + * + *
+   * The fully qualified uri of the source backup from which this
+   * backup was copied. eg.
+   * "projects/<project_id>/instances/<instance_id>/backups/<backup_id>".
+   * 
+ * + * string source_backup = 4; + * + * @return The bytes for sourceBackup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBackupBytes() { + java.lang.Object ref = sourceBackup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceBackup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * Output only. The expiration time of the backup, which must be at least 6
+   * hours and at most 366 days from the time the request is received.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return expireTime_ != null; + } + /** + * + * + *
+   * Output only. The expiration time of the backup, which must be at least 6
+   * hours and at most 366 days from the time the request is received.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * Output only. The expiration time of the backup, which must be at least 6
+   * hours and at most 366 days from the time the request is received.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sourceBackup_); + } + if (expireTime_ != null) { + output.writeMessage(5, getExpireTime()); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sourceBackup_); + } + if (expireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExpireTime()); + } + 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.executor.v1.CopyCloudBackupAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.CopyCloudBackupAction other = + (com.google.spanner.executor.v1.CopyCloudBackupAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getBackupId().equals(other.getBackupId())) return false; + if (!getSourceBackup().equals(other.getSourceBackup())) return false; + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupId().hashCode(); + hash = (37 * hash) + SOURCE_BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getSourceBackup().hashCode(); + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.CopyCloudBackupAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CopyCloudBackupAction 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.executor.v1.CopyCloudBackupAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CopyCloudBackupAction 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.executor.v1.CopyCloudBackupAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CopyCloudBackupAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.CopyCloudBackupAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CopyCloudBackupAction 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.executor.v1.CopyCloudBackupAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CopyCloudBackupAction 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.executor.v1.CopyCloudBackupAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CopyCloudBackupAction 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.executor.v1.CopyCloudBackupAction 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; + } + /** + * + * + *
+   * Action that copies a Cloud Spanner database backup.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CopyCloudBackupAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CopyCloudBackupAction) + com.google.spanner.executor.v1.CopyCloudBackupActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CopyCloudBackupAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CopyCloudBackupAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CopyCloudBackupAction.class, + com.google.spanner.executor.v1.CopyCloudBackupAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.CopyCloudBackupAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + backupId_ = ""; + sourceBackup_ = ""; + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CopyCloudBackupAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CopyCloudBackupAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.CopyCloudBackupAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.CopyCloudBackupAction build() { + com.google.spanner.executor.v1.CopyCloudBackupAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CopyCloudBackupAction buildPartial() { + com.google.spanner.executor.v1.CopyCloudBackupAction result = + new com.google.spanner.executor.v1.CopyCloudBackupAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.CopyCloudBackupAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupId_ = backupId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sourceBackup_ = sourceBackup_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.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.executor.v1.CopyCloudBackupAction) { + return mergeFrom((com.google.spanner.executor.v1.CopyCloudBackupAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.CopyCloudBackupAction other) { + if (other == com.google.spanner.executor.v1.CopyCloudBackupAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getBackupId().isEmpty()) { + backupId_ = other.backupId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getSourceBackup().isEmpty()) { + sourceBackup_ = other.sourceBackup_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + backupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + sourceBackup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object backupId_ = ""; + /** + * + * + *
+     * The id of the backup to be created, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The id of the backup to be created, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The id of the backup to be created, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @param value The backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the backup to be created, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearBackupId() { + backupId_ = getDefaultInstance().getBackupId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the backup to be created, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @param value The bytes for backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object sourceBackup_ = ""; + /** + * + * + *
+     * The fully qualified uri of the source backup from which this
+     * backup was copied. eg.
+     * "projects/<project_id>/instances/<instance_id>/backups/<backup_id>".
+     * 
+ * + * string source_backup = 4; + * + * @return The sourceBackup. + */ + public java.lang.String getSourceBackup() { + java.lang.Object ref = sourceBackup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceBackup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The fully qualified uri of the source backup from which this
+     * backup was copied. eg.
+     * "projects/<project_id>/instances/<instance_id>/backups/<backup_id>".
+     * 
+ * + * string source_backup = 4; + * + * @return The bytes for sourceBackup. + */ + public com.google.protobuf.ByteString getSourceBackupBytes() { + java.lang.Object ref = sourceBackup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceBackup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The fully qualified uri of the source backup from which this
+     * backup was copied. eg.
+     * "projects/<project_id>/instances/<instance_id>/backups/<backup_id>".
+     * 
+ * + * string source_backup = 4; + * + * @param value The sourceBackup to set. + * @return This builder for chaining. + */ + public Builder setSourceBackup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceBackup_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The fully qualified uri of the source backup from which this
+     * backup was copied. eg.
+     * "projects/<project_id>/instances/<instance_id>/backups/<backup_id>".
+     * 
+ * + * string source_backup = 4; + * + * @return This builder for chaining. + */ + public Builder clearSourceBackup() { + sourceBackup_ = getDefaultInstance().getSourceBackup(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The fully qualified uri of the source backup from which this
+     * backup was copied. eg.
+     * "projects/<project_id>/instances/<instance_id>/backups/<backup_id>".
+     * 
+ * + * string source_backup = 4; + * + * @param value The bytes for sourceBackup to set. + * @return This builder for chaining. + */ + public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceBackup_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + } else { + expireTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && expireTime_ != null + && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpireTimeBuilder().mergeFrom(value); + } else { + expireTime_ = value; + } + } else { + expireTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpireTime() { + bitField0_ = (bitField0_ & ~0x00000010); + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + @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.executor.v1.CopyCloudBackupAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.CopyCloudBackupAction) + private static final com.google.spanner.executor.v1.CopyCloudBackupAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.CopyCloudBackupAction(); + } + + public static com.google.spanner.executor.v1.CopyCloudBackupAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CopyCloudBackupAction 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.executor.v1.CopyCloudBackupAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CopyCloudBackupActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CopyCloudBackupActionOrBuilder.java new file mode 100644 index 00000000000..3711ba08389 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CopyCloudBackupActionOrBuilder.java @@ -0,0 +1,170 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface CopyCloudBackupActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CopyCloudBackupAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * The id of the backup to be created, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + java.lang.String getBackupId(); + /** + * + * + *
+   * The id of the backup to be created, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + com.google.protobuf.ByteString getBackupIdBytes(); + + /** + * + * + *
+   * The fully qualified uri of the source backup from which this
+   * backup was copied. eg.
+   * "projects/<project_id>/instances/<instance_id>/backups/<backup_id>".
+   * 
+ * + * string source_backup = 4; + * + * @return The sourceBackup. + */ + java.lang.String getSourceBackup(); + /** + * + * + *
+   * The fully qualified uri of the source backup from which this
+   * backup was copied. eg.
+   * "projects/<project_id>/instances/<instance_id>/backups/<backup_id>".
+   * 
+ * + * string source_backup = 4; + * + * @return The bytes for sourceBackup. + */ + com.google.protobuf.ByteString getSourceBackupBytes(); + + /** + * + * + *
+   * Output only. The expiration time of the backup, which must be at least 6
+   * hours and at most 366 days from the time the request is received.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + /** + * + * + *
+   * Output only. The expiration time of the backup, which must be at least 6
+   * hours and at most 366 days from the time the request is received.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * Output only. The expiration time of the backup, which must be at least 6
+   * hours and at most 366 days from the time the request is received.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupAction.java new file mode 100644 index 00000000000..58c05a75645 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupAction.java @@ -0,0 +1,1777 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that creates a Cloud Spanner database backup.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CreateCloudBackupAction} + */ +public final class CreateCloudBackupAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CreateCloudBackupAction) + CreateCloudBackupActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCloudBackupAction.newBuilder() to construct. + private CreateCloudBackupAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCloudBackupAction() { + projectId_ = ""; + instanceId_ = ""; + backupId_ = ""; + databaseId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCloudBackupAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudBackupAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudBackupAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CreateCloudBackupAction.class, + com.google.spanner.executor.v1.CreateCloudBackupAction.Builder.class); + } + + private int bitField0_; + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupId_ = ""; + /** + * + * + *
+   * The id of the backup to be created, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + @java.lang.Override + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + 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(); + backupId_ = s; + return s; + } + } + /** + * + * + *
+   * The id of the backup to be created, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseId_ = ""; + /** + * + * + *
+   * The id of the database from which this backup was
+   * created, e.g. "db0". Note that this needs to be in the
+   * same instance as the backup.
+   * 
+ * + * string database_id = 4; + * + * @return The databaseId. + */ + @java.lang.Override + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + 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(); + databaseId_ = s; + return s; + } + } + /** + * + * + *
+   * The id of the database from which this backup was
+   * created, e.g. "db0". Note that this needs to be in the
+   * same instance as the backup.
+   * 
+ * + * string database_id = 4; + * + * @return The bytes for databaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * Output only. The expiration time of the backup, which must be at least 6
+   * hours and at most 366 days from the time the request is received.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return expireTime_ != null; + } + /** + * + * + *
+   * Output only. The expiration time of the backup, which must be at least 6
+   * hours and at most 366 days from the time the request is received.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * Output only. The expiration time of the backup, which must be at least 6
+   * hours and at most 366 days from the time the request is received.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + public static final int VERSION_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp versionTime_; + /** + * + * + *
+   * The version time of the backup, which must be within the time range of
+   * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+   * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+   * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + * + * @return Whether the versionTime field is set. + */ + @java.lang.Override + public boolean hasVersionTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The version time of the backup, which must be within the time range of
+   * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+   * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+   * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + * + * @return The versionTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getVersionTime() { + return versionTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : versionTime_; + } + /** + * + * + *
+   * The version time of the backup, which must be within the time range of
+   * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+   * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+   * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { + return versionTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : versionTime_; + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, databaseId_); + } + if (expireTime_ != null) { + output.writeMessage(5, getExpireTime()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getVersionTime()); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, databaseId_); + } + if (expireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExpireTime()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getVersionTime()); + } + 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.executor.v1.CreateCloudBackupAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.CreateCloudBackupAction other = + (com.google.spanner.executor.v1.CreateCloudBackupAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getBackupId().equals(other.getBackupId())) return false; + if (!getDatabaseId().equals(other.getDatabaseId())) return false; + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) return false; + } + if (hasVersionTime() != other.hasVersionTime()) return false; + if (hasVersionTime()) { + if (!getVersionTime().equals(other.getVersionTime())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupId().hashCode(); + hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseId().hashCode(); + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + if (hasVersionTime()) { + hash = (37 * hash) + VERSION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getVersionTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.CreateCloudBackupAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CreateCloudBackupAction 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.executor.v1.CreateCloudBackupAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CreateCloudBackupAction 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.executor.v1.CreateCloudBackupAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CreateCloudBackupAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.CreateCloudBackupAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CreateCloudBackupAction 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.executor.v1.CreateCloudBackupAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CreateCloudBackupAction 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.executor.v1.CreateCloudBackupAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CreateCloudBackupAction 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.executor.v1.CreateCloudBackupAction 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; + } + /** + * + * + *
+   * Action that creates a Cloud Spanner database backup.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CreateCloudBackupAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CreateCloudBackupAction) + com.google.spanner.executor.v1.CreateCloudBackupActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudBackupAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudBackupAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CreateCloudBackupAction.class, + com.google.spanner.executor.v1.CreateCloudBackupAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.CreateCloudBackupAction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExpireTimeFieldBuilder(); + getVersionTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + backupId_ = ""; + databaseId_ = ""; + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + versionTime_ = null; + if (versionTimeBuilder_ != null) { + versionTimeBuilder_.dispose(); + versionTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudBackupAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudBackupAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.CreateCloudBackupAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudBackupAction build() { + com.google.spanner.executor.v1.CreateCloudBackupAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudBackupAction buildPartial() { + com.google.spanner.executor.v1.CreateCloudBackupAction result = + new com.google.spanner.executor.v1.CreateCloudBackupAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.CreateCloudBackupAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupId_ = backupId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.databaseId_ = databaseId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.build(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.versionTime_ = + versionTimeBuilder_ == null ? versionTime_ : versionTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_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.executor.v1.CreateCloudBackupAction) { + return mergeFrom((com.google.spanner.executor.v1.CreateCloudBackupAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.CreateCloudBackupAction other) { + if (other == com.google.spanner.executor.v1.CreateCloudBackupAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getBackupId().isEmpty()) { + backupId_ = other.backupId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDatabaseId().isEmpty()) { + databaseId_ = other.databaseId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + if (other.hasVersionTime()) { + mergeVersionTime(other.getVersionTime()); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + backupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + databaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getVersionTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + 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 projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object backupId_ = ""; + /** + * + * + *
+     * The id of the backup to be created, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The id of the backup to be created, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The id of the backup to be created, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @param value The backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the backup to be created, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearBackupId() { + backupId_ = getDefaultInstance().getBackupId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the backup to be created, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @param value The bytes for backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object databaseId_ = ""; + /** + * + * + *
+     * The id of the database from which this backup was
+     * created, e.g. "db0". Note that this needs to be in the
+     * same instance as the backup.
+     * 
+ * + * string database_id = 4; + * + * @return The databaseId. + */ + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The id of the database from which this backup was
+     * created, e.g. "db0". Note that this needs to be in the
+     * same instance as the backup.
+     * 
+ * + * string database_id = 4; + * + * @return The bytes for databaseId. + */ + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The id of the database from which this backup was
+     * created, e.g. "db0". Note that this needs to be in the
+     * same instance as the backup.
+     * 
+ * + * string database_id = 4; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the database from which this backup was
+     * created, e.g. "db0". Note that this needs to be in the
+     * same instance as the backup.
+     * 
+ * + * string database_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + databaseId_ = getDefaultInstance().getDatabaseId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the database from which this backup was
+     * created, e.g. "db0". Note that this needs to be in the
+     * same instance as the backup.
+     * 
+ * + * string database_id = 4; + * + * @param value The bytes for databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + } else { + expireTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && expireTime_ != null + && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpireTimeBuilder().mergeFrom(value); + } else { + expireTime_ = value; + } + } else { + expireTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpireTime() { + bitField0_ = (bitField0_ & ~0x00000010); + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * Output only. The expiration time of the backup, which must be at least 6
+     * hours and at most 366 days from the time the request is received.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + private com.google.protobuf.Timestamp versionTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + versionTimeBuilder_; + /** + * + * + *
+     * The version time of the backup, which must be within the time range of
+     * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+     * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+     * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + * + * @return Whether the versionTime field is set. + */ + public boolean hasVersionTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The version time of the backup, which must be within the time range of
+     * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+     * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+     * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + * + * @return The versionTime. + */ + public com.google.protobuf.Timestamp getVersionTime() { + if (versionTimeBuilder_ == null) { + return versionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : versionTime_; + } else { + return versionTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The version time of the backup, which must be within the time range of
+     * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+     * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+     * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + */ + public Builder setVersionTime(com.google.protobuf.Timestamp value) { + if (versionTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + versionTime_ = value; + } else { + versionTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The version time of the backup, which must be within the time range of
+     * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+     * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+     * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + */ + public Builder setVersionTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (versionTimeBuilder_ == null) { + versionTime_ = builderForValue.build(); + } else { + versionTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The version time of the backup, which must be within the time range of
+     * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+     * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+     * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + */ + public Builder mergeVersionTime(com.google.protobuf.Timestamp value) { + if (versionTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && versionTime_ != null + && versionTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getVersionTimeBuilder().mergeFrom(value); + } else { + versionTime_ = value; + } + } else { + versionTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The version time of the backup, which must be within the time range of
+     * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+     * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+     * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + */ + public Builder clearVersionTime() { + bitField0_ = (bitField0_ & ~0x00000020); + versionTime_ = null; + if (versionTimeBuilder_ != null) { + versionTimeBuilder_.dispose(); + versionTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The version time of the backup, which must be within the time range of
+     * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+     * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+     * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getVersionTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getVersionTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The version time of the backup, which must be within the time range of
+     * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+     * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+     * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder() { + if (versionTimeBuilder_ != null) { + return versionTimeBuilder_.getMessageOrBuilder(); + } else { + return versionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : versionTime_; + } + } + /** + * + * + *
+     * The version time of the backup, which must be within the time range of
+     * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+     * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+     * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getVersionTimeFieldBuilder() { + if (versionTimeBuilder_ == null) { + versionTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getVersionTime(), getParentForChildren(), isClean()); + versionTime_ = null; + } + return versionTimeBuilder_; + } + + @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.executor.v1.CreateCloudBackupAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.CreateCloudBackupAction) + private static final com.google.spanner.executor.v1.CreateCloudBackupAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.CreateCloudBackupAction(); + } + + public static com.google.spanner.executor.v1.CreateCloudBackupAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCloudBackupAction 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.executor.v1.CreateCloudBackupAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupActionOrBuilder.java new file mode 100644 index 00000000000..bec47bf3112 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudBackupActionOrBuilder.java @@ -0,0 +1,211 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface CreateCloudBackupActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CreateCloudBackupAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * The id of the backup to be created, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + java.lang.String getBackupId(); + /** + * + * + *
+   * The id of the backup to be created, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + com.google.protobuf.ByteString getBackupIdBytes(); + + /** + * + * + *
+   * The id of the database from which this backup was
+   * created, e.g. "db0". Note that this needs to be in the
+   * same instance as the backup.
+   * 
+ * + * string database_id = 4; + * + * @return The databaseId. + */ + java.lang.String getDatabaseId(); + /** + * + * + *
+   * The id of the database from which this backup was
+   * created, e.g. "db0". Note that this needs to be in the
+   * same instance as the backup.
+   * 
+ * + * string database_id = 4; + * + * @return The bytes for databaseId. + */ + com.google.protobuf.ByteString getDatabaseIdBytes(); + + /** + * + * + *
+   * Output only. The expiration time of the backup, which must be at least 6
+   * hours and at most 366 days from the time the request is received.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + /** + * + * + *
+   * Output only. The expiration time of the backup, which must be at least 6
+   * hours and at most 366 days from the time the request is received.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * Output only. The expiration time of the backup, which must be at least 6
+   * hours and at most 366 days from the time the request is received.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); + + /** + * + * + *
+   * The version time of the backup, which must be within the time range of
+   * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+   * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+   * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + * + * @return Whether the versionTime field is set. + */ + boolean hasVersionTime(); + /** + * + * + *
+   * The version time of the backup, which must be within the time range of
+   * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+   * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+   * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + * + * @return The versionTime. + */ + com.google.protobuf.Timestamp getVersionTime(); + /** + * + * + *
+   * The version time of the backup, which must be within the time range of
+   * [earliest_version_time, NOW], where earliest_version_time is retrieved by
+   * cloud spanner frontend API (See details: go/cs-pitr-lite-design).
+   * 
+ * + * optional .google.protobuf.Timestamp version_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getVersionTimeOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudDatabaseAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudDatabaseAction.java new file mode 100644 index 00000000000..fcf13229671 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudDatabaseAction.java @@ -0,0 +1,1867 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that creates a Cloud Spanner database.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CreateCloudDatabaseAction} + */ +public final class CreateCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CreateCloudDatabaseAction) + CreateCloudDatabaseActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCloudDatabaseAction.newBuilder() to construct. + private CreateCloudDatabaseAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCloudDatabaseAction() { + instanceId_ = ""; + projectId_ = ""; + databaseId_ = ""; + sdlStatement_ = com.google.protobuf.LazyStringArrayList.emptyList(); + dialect_ = ""; + protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCloudDatabaseAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CreateCloudDatabaseAction.class, + com.google.spanner.executor.v1.CreateCloudDatabaseAction.Builder.class); + } + + private int bitField0_; + public static final int INSTANCE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseId_ = ""; + /** + * + * + *
+   * Cloud database ID (not full path), e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + @java.lang.Override + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + 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(); + databaseId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud database ID (not full path), e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SDL_STATEMENT_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList sdlStatement_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * SDL statements to apply to the new database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @return A list containing the sdlStatement. + */ + public com.google.protobuf.ProtocolStringList getSdlStatementList() { + return sdlStatement_; + } + /** + * + * + *
+   * SDL statements to apply to the new database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @return The count of sdlStatement. + */ + public int getSdlStatementCount() { + return sdlStatement_.size(); + } + /** + * + * + *
+   * SDL statements to apply to the new database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index of the element to return. + * @return The sdlStatement at the given index. + */ + public java.lang.String getSdlStatement(int index) { + return sdlStatement_.get(index); + } + /** + * + * + *
+   * SDL statements to apply to the new database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index of the value to return. + * @return The bytes of the sdlStatement at the given index. + */ + public com.google.protobuf.ByteString getSdlStatementBytes(int index) { + return sdlStatement_.getByteString(index); + } + + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 5; + private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; + /** + * + * + *
+   * The KMS key used to encrypt the database to be created if the database
+   * should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + * + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return encryptionConfig_ != null; + } + /** + * + * + *
+   * The KMS key used to encrypt the database to be created if the database
+   * should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + * + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + /** + * + * + *
+   * The KMS key used to encrypt the database to be created if the database
+   * should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + */ + @java.lang.Override + public com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + + public static final int DIALECT_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object dialect_ = ""; + /** + * + * + *
+   * Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
+   * 
+ * + * optional string dialect = 6; + * + * @return Whether the dialect field is set. + */ + @java.lang.Override + public boolean hasDialect() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
+   * 
+ * + * optional string dialect = 6; + * + * @return The dialect. + */ + @java.lang.Override + public java.lang.String getDialect() { + java.lang.Object ref = dialect_; + 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(); + dialect_ = s; + return s; + } + } + /** + * + * + *
+   * Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
+   * 
+ * + * optional string dialect = 6; + * + * @return The bytes for dialect. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDialectBytes() { + java.lang.Object ref = dialect_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dialect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTO_DESCRIPTORS_FIELD_NUMBER = 7; + private com.google.protobuf.ByteString protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes proto_descriptors = 7; + * + * @return Whether the protoDescriptors field is set. + */ + @java.lang.Override + public boolean hasProtoDescriptors() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * optional bytes proto_descriptors = 7; + * + * @return The protoDescriptors. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtoDescriptors() { + return protoDescriptors_; + } + + 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(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseId_); + } + for (int i = 0; i < sdlStatement_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sdlStatement_.getRaw(i)); + } + if (encryptionConfig_ != null) { + output.writeMessage(5, getEncryptionConfig()); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, dialect_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeBytes(7, protoDescriptors_); + } + 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(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseId_); + } + { + int dataSize = 0; + for (int i = 0; i < sdlStatement_.size(); i++) { + dataSize += computeStringSizeNoTag(sdlStatement_.getRaw(i)); + } + size += dataSize; + size += 1 * getSdlStatementList().size(); + } + if (encryptionConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEncryptionConfig()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, dialect_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(7, protoDescriptors_); + } + 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.executor.v1.CreateCloudDatabaseAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.CreateCloudDatabaseAction other = + (com.google.spanner.executor.v1.CreateCloudDatabaseAction) obj; + + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getDatabaseId().equals(other.getDatabaseId())) return false; + if (!getSdlStatementList().equals(other.getSdlStatementList())) return false; + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; + } + if (hasDialect() != other.hasDialect()) return false; + if (hasDialect()) { + if (!getDialect().equals(other.getDialect())) return false; + } + if (hasProtoDescriptors() != other.hasProtoDescriptors()) return false; + if (hasProtoDescriptors()) { + if (!getProtoDescriptors().equals(other.getProtoDescriptors())) 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) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseId().hashCode(); + if (getSdlStatementCount() > 0) { + hash = (37 * hash) + SDL_STATEMENT_FIELD_NUMBER; + hash = (53 * hash) + getSdlStatementList().hashCode(); + } + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } + if (hasDialect()) { + hash = (37 * hash) + DIALECT_FIELD_NUMBER; + hash = (53 * hash) + getDialect().hashCode(); + } + if (hasProtoDescriptors()) { + hash = (37 * hash) + PROTO_DESCRIPTORS_FIELD_NUMBER; + hash = (53 * hash) + getProtoDescriptors().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.CreateCloudDatabaseAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CreateCloudDatabaseAction 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.executor.v1.CreateCloudDatabaseAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CreateCloudDatabaseAction 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.executor.v1.CreateCloudDatabaseAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CreateCloudDatabaseAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.CreateCloudDatabaseAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CreateCloudDatabaseAction 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.executor.v1.CreateCloudDatabaseAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CreateCloudDatabaseAction 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.executor.v1.CreateCloudDatabaseAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CreateCloudDatabaseAction 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.executor.v1.CreateCloudDatabaseAction 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; + } + /** + * + * + *
+   * Action that creates a Cloud Spanner database.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CreateCloudDatabaseAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CreateCloudDatabaseAction) + com.google.spanner.executor.v1.CreateCloudDatabaseActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CreateCloudDatabaseAction.class, + com.google.spanner.executor.v1.CreateCloudDatabaseAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.CreateCloudDatabaseAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceId_ = ""; + projectId_ = ""; + databaseId_ = ""; + sdlStatement_ = com.google.protobuf.LazyStringArrayList.emptyList(); + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + dialect_ = ""; + protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudDatabaseAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudDatabaseAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.CreateCloudDatabaseAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudDatabaseAction build() { + com.google.spanner.executor.v1.CreateCloudDatabaseAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudDatabaseAction buildPartial() { + com.google.spanner.executor.v1.CreateCloudDatabaseAction result = + new com.google.spanner.executor.v1.CreateCloudDatabaseAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.CreateCloudDatabaseAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.databaseId_ = databaseId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + sdlStatement_.makeImmutable(); + result.sdlStatement_ = sdlStatement_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.encryptionConfig_ = + encryptionConfigBuilder_ == null ? encryptionConfig_ : encryptionConfigBuilder_.build(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.dialect_ = dialect_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.protoDescriptors_ = protoDescriptors_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_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.executor.v1.CreateCloudDatabaseAction) { + return mergeFrom((com.google.spanner.executor.v1.CreateCloudDatabaseAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.CreateCloudDatabaseAction other) { + if (other == com.google.spanner.executor.v1.CreateCloudDatabaseAction.getDefaultInstance()) + return this; + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDatabaseId().isEmpty()) { + databaseId_ = other.databaseId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.sdlStatement_.isEmpty()) { + if (sdlStatement_.isEmpty()) { + sdlStatement_ = other.sdlStatement_; + bitField0_ |= 0x00000008; + } else { + ensureSdlStatementIsMutable(); + sdlStatement_.addAll(other.sdlStatement_); + } + onChanged(); + } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } + if (other.hasDialect()) { + dialect_ = other.dialect_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasProtoDescriptors()) { + setProtoDescriptors(other.getProtoDescriptors()); + } + 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: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + databaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSdlStatementIsMutable(); + sdlStatement_.add(s); + break; + } // case 34 + case 42: + { + input.readMessage( + getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + dialect_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + protoDescriptors_ = input.readBytes(); + bitField0_ |= 0x00000040; + break; + } // case 58 + 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 instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object databaseId_ = ""; + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + databaseId_ = getDefaultInstance().getDatabaseId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @param value The bytes for databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList sdlStatement_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSdlStatementIsMutable() { + if (!sdlStatement_.isModifiable()) { + sdlStatement_ = new com.google.protobuf.LazyStringArrayList(sdlStatement_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * SDL statements to apply to the new database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @return A list containing the sdlStatement. + */ + public com.google.protobuf.ProtocolStringList getSdlStatementList() { + sdlStatement_.makeImmutable(); + return sdlStatement_; + } + /** + * + * + *
+     * SDL statements to apply to the new database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @return The count of sdlStatement. + */ + public int getSdlStatementCount() { + return sdlStatement_.size(); + } + /** + * + * + *
+     * SDL statements to apply to the new database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index of the element to return. + * @return The sdlStatement at the given index. + */ + public java.lang.String getSdlStatement(int index) { + return sdlStatement_.get(index); + } + /** + * + * + *
+     * SDL statements to apply to the new database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index of the value to return. + * @return The bytes of the sdlStatement at the given index. + */ + public com.google.protobuf.ByteString getSdlStatementBytes(int index) { + return sdlStatement_.getByteString(index); + } + /** + * + * + *
+     * SDL statements to apply to the new database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index to set the value at. + * @param value The sdlStatement to set. + * @return This builder for chaining. + */ + public Builder setSdlStatement(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSdlStatementIsMutable(); + sdlStatement_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * SDL statements to apply to the new database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @param value The sdlStatement to add. + * @return This builder for chaining. + */ + public Builder addSdlStatement(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSdlStatementIsMutable(); + sdlStatement_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * SDL statements to apply to the new database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @param values The sdlStatement to add. + * @return This builder for chaining. + */ + public Builder addAllSdlStatement(java.lang.Iterable values) { + ensureSdlStatementIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sdlStatement_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * SDL statements to apply to the new database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @return This builder for chaining. + */ + public Builder clearSdlStatement() { + sdlStatement_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * SDL statements to apply to the new database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @param value The bytes of the sdlStatement to add. + * @return This builder for chaining. + */ + public Builder addSdlStatementBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSdlStatementIsMutable(); + sdlStatement_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.spanner.admin.database.v1.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionConfig, + com.google.spanner.admin.database.v1.EncryptionConfig.Builder, + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> + encryptionConfigBuilder_; + /** + * + * + *
+     * The KMS key used to encrypt the database to be created if the database
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + * + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The KMS key used to encrypt the database to be created if the database
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + * + * @return The encryptionConfig. + */ + public com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The KMS key used to encrypt the database to be created if the database
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + */ + public Builder setEncryptionConfig( + com.google.spanner.admin.database.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + } else { + encryptionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key used to encrypt the database to be created if the database
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + */ + public Builder setEncryptionConfig( + com.google.spanner.admin.database.v1.EncryptionConfig.Builder builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key used to encrypt the database to be created if the database
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + */ + public Builder mergeEncryptionConfig( + com.google.spanner.admin.database.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && encryptionConfig_ != null + && encryptionConfig_ + != com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance()) { + getEncryptionConfigBuilder().mergeFrom(value); + } else { + encryptionConfig_ = value; + } + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key used to encrypt the database to be created if the database
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + */ + public Builder clearEncryptionConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The KMS key used to encrypt the database to be created if the database
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + */ + public com.google.spanner.admin.database.v1.EncryptionConfig.Builder + getEncryptionConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The KMS key used to encrypt the database to be created if the database
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + */ + public com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null + ? com.google.spanner.admin.database.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + } + /** + * + * + *
+     * The KMS key used to encrypt the database to be created if the database
+     * should be CMEK protected.
+     * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionConfig, + com.google.spanner.admin.database.v1.EncryptionConfig.Builder, + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.database.v1.EncryptionConfig, + com.google.spanner.admin.database.v1.EncryptionConfig.Builder, + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder>( + getEncryptionConfig(), getParentForChildren(), isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + + private java.lang.Object dialect_ = ""; + /** + * + * + *
+     * Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
+     * 
+ * + * optional string dialect = 6; + * + * @return Whether the dialect field is set. + */ + public boolean hasDialect() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
+     * 
+ * + * optional string dialect = 6; + * + * @return The dialect. + */ + public java.lang.String getDialect() { + java.lang.Object ref = dialect_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dialect_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
+     * 
+ * + * optional string dialect = 6; + * + * @return The bytes for dialect. + */ + public com.google.protobuf.ByteString getDialectBytes() { + java.lang.Object ref = dialect_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dialect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
+     * 
+ * + * optional string dialect = 6; + * + * @param value The dialect to set. + * @return This builder for chaining. + */ + public Builder setDialect(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dialect_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
+     * 
+ * + * optional string dialect = 6; + * + * @return This builder for chaining. + */ + public Builder clearDialect() { + dialect_ = getDefaultInstance().getDialect(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
+     * 
+ * + * optional string dialect = 6; + * + * @param value The bytes for dialect to set. + * @return This builder for chaining. + */ + public Builder setDialectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dialect_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes proto_descriptors = 7; + * + * @return Whether the protoDescriptors field is set. + */ + @java.lang.Override + public boolean hasProtoDescriptors() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * optional bytes proto_descriptors = 7; + * + * @return The protoDescriptors. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtoDescriptors() { + return protoDescriptors_; + } + /** + * optional bytes proto_descriptors = 7; + * + * @param value The protoDescriptors to set. + * @return This builder for chaining. + */ + public Builder setProtoDescriptors(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + protoDescriptors_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * optional bytes proto_descriptors = 7; + * + * @return This builder for chaining. + */ + public Builder clearProtoDescriptors() { + bitField0_ = (bitField0_ & ~0x00000040); + protoDescriptors_ = getDefaultInstance().getProtoDescriptors(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.CreateCloudDatabaseAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.CreateCloudDatabaseAction) + private static final com.google.spanner.executor.v1.CreateCloudDatabaseAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.CreateCloudDatabaseAction(); + } + + public static com.google.spanner.executor.v1.CreateCloudDatabaseAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCloudDatabaseAction 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.executor.v1.CreateCloudDatabaseAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudDatabaseActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudDatabaseActionOrBuilder.java new file mode 100644 index 00000000000..82f57ec3511 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudDatabaseActionOrBuilder.java @@ -0,0 +1,239 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface CreateCloudDatabaseActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CreateCloudDatabaseAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud database ID (not full path), e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + java.lang.String getDatabaseId(); + /** + * + * + *
+   * Cloud database ID (not full path), e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + com.google.protobuf.ByteString getDatabaseIdBytes(); + + /** + * + * + *
+   * SDL statements to apply to the new database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @return A list containing the sdlStatement. + */ + java.util.List getSdlStatementList(); + /** + * + * + *
+   * SDL statements to apply to the new database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @return The count of sdlStatement. + */ + int getSdlStatementCount(); + /** + * + * + *
+   * SDL statements to apply to the new database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index of the element to return. + * @return The sdlStatement at the given index. + */ + java.lang.String getSdlStatement(int index); + /** + * + * + *
+   * SDL statements to apply to the new database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index of the value to return. + * @return The bytes of the sdlStatement at the given index. + */ + com.google.protobuf.ByteString getSdlStatementBytes(int index); + + /** + * + * + *
+   * The KMS key used to encrypt the database to be created if the database
+   * should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + * + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + /** + * + * + *
+   * The KMS key used to encrypt the database to be created if the database
+   * should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + * + * @return The encryptionConfig. + */ + com.google.spanner.admin.database.v1.EncryptionConfig getEncryptionConfig(); + /** + * + * + *
+   * The KMS key used to encrypt the database to be created if the database
+   * should be CMEK protected.
+   * 
+ * + * .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + */ + com.google.spanner.admin.database.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); + + /** + * + * + *
+   * Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
+   * 
+ * + * optional string dialect = 6; + * + * @return Whether the dialect field is set. + */ + boolean hasDialect(); + /** + * + * + *
+   * Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
+   * 
+ * + * optional string dialect = 6; + * + * @return The dialect. + */ + java.lang.String getDialect(); + /** + * + * + *
+   * Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
+   * 
+ * + * optional string dialect = 6; + * + * @return The bytes for dialect. + */ + com.google.protobuf.ByteString getDialectBytes(); + + /** + * optional bytes proto_descriptors = 7; + * + * @return Whether the protoDescriptors field is set. + */ + boolean hasProtoDescriptors(); + /** + * optional bytes proto_descriptors = 7; + * + * @return The protoDescriptors. + */ + com.google.protobuf.ByteString getProtoDescriptors(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudInstanceAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudInstanceAction.java new file mode 100644 index 00000000000..612ae8e2bb1 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudInstanceAction.java @@ -0,0 +1,1903 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that creates a Cloud Spanner instance.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CreateCloudInstanceAction} + */ +public final class CreateCloudInstanceAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CreateCloudInstanceAction) + CreateCloudInstanceActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCloudInstanceAction.newBuilder() to construct. + private CreateCloudInstanceAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCloudInstanceAction() { + instanceId_ = ""; + projectId_ = ""; + instanceConfigId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCloudInstanceAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CreateCloudInstanceAction.class, + com.google.spanner.executor.v1.CreateCloudInstanceAction.Builder.class); + } + + private int bitField0_; + public static final int INSTANCE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_CONFIG_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceConfigId_ = ""; + /** + * + * + *
+   * Instance config ID, e.g. "test-config".
+   * 
+ * + * string instance_config_id = 3; + * + * @return The instanceConfigId. + */ + @java.lang.Override + public java.lang.String getInstanceConfigId() { + java.lang.Object ref = instanceConfigId_; + 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(); + instanceConfigId_ = s; + return s; + } + } + /** + * + * + *
+   * Instance config ID, e.g. "test-config".
+   * 
+ * + * string instance_config_id = 3; + * + * @return The bytes for instanceConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceConfigIdBytes() { + java.lang.Object ref = instanceConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_COUNT_FIELD_NUMBER = 4; + private int nodeCount_ = 0; + /** + * + * + *
+   * Number of nodes (processing_units should not be set or set to 0 if used).
+   * 
+ * + * optional int32 node_count = 4; + * + * @return Whether the nodeCount field is set. + */ + @java.lang.Override + public boolean hasNodeCount() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Number of nodes (processing_units should not be set or set to 0 if used).
+   * 
+ * + * optional int32 node_count = 4; + * + * @return The nodeCount. + */ + @java.lang.Override + public int getNodeCount() { + return nodeCount_; + } + + public static final int PROCESSING_UNITS_FIELD_NUMBER = 6; + private int processingUnits_ = 0; + /** + * + * + *
+   * Number of processing units (node_count should be set to 0 if used).
+   * 
+ * + * optional int32 processing_units = 6; + * + * @return Whether the processingUnits field is set. + */ + @java.lang.Override + public boolean hasProcessingUnits() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Number of processing units (node_count should be set to 0 if used).
+   * 
+ * + * optional int32 processing_units = 6; + * + * @return The processingUnits. + */ + @java.lang.Override + public int getProcessingUnits() { + return processingUnits_; + } + + public static final int AUTOSCALING_CONFIG_FIELD_NUMBER = 7; + private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_; + /** + * + * + *
+   * The autoscaling config for this instance. If non-empty, an autoscaling
+   * instance will be created (processing_units and node_count should be set to
+   * 0 if used).
+   * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + * + * @return Whether the autoscalingConfig field is set. + */ + @java.lang.Override + public boolean hasAutoscalingConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The autoscaling config for this instance. If non-empty, an autoscaling
+   * instance will be created (processing_units and node_count should be set to
+   * 0 if used).
+   * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + * + * @return The autoscalingConfig. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig getAutoscalingConfig() { + return autoscalingConfig_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance() + : autoscalingConfig_; + } + /** + * + * + *
+   * The autoscaling config for this instance. If non-empty, an autoscaling
+   * instance will be created (processing_units and node_count should be set to
+   * 0 if used).
+   * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder + getAutoscalingConfigOrBuilder() { + return autoscalingConfig_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance() + : autoscalingConfig_; + } + + public static final int LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceConfigId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instanceConfigId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(4, nodeCount_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(6, processingUnits_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getAutoscalingConfig()); + } + 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(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceConfigId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instanceConfigId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, nodeCount_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, labels__); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, processingUnits_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAutoscalingConfig()); + } + 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.executor.v1.CreateCloudInstanceAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.CreateCloudInstanceAction other = + (com.google.spanner.executor.v1.CreateCloudInstanceAction) obj; + + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceConfigId().equals(other.getInstanceConfigId())) return false; + if (hasNodeCount() != other.hasNodeCount()) return false; + if (hasNodeCount()) { + if (getNodeCount() != other.getNodeCount()) return false; + } + if (hasProcessingUnits() != other.hasProcessingUnits()) return false; + if (hasProcessingUnits()) { + if (getProcessingUnits() != other.getProcessingUnits()) return false; + } + if (hasAutoscalingConfig() != other.hasAutoscalingConfig()) return false; + if (hasAutoscalingConfig()) { + if (!getAutoscalingConfig().equals(other.getAutoscalingConfig())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) 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) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceConfigId().hashCode(); + if (hasNodeCount()) { + hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getNodeCount(); + } + if (hasProcessingUnits()) { + hash = (37 * hash) + PROCESSING_UNITS_FIELD_NUMBER; + hash = (53 * hash) + getProcessingUnits(); + } + if (hasAutoscalingConfig()) { + hash = (37 * hash) + AUTOSCALING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAutoscalingConfig().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.CreateCloudInstanceAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CreateCloudInstanceAction 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.executor.v1.CreateCloudInstanceAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CreateCloudInstanceAction 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.executor.v1.CreateCloudInstanceAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CreateCloudInstanceAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.CreateCloudInstanceAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CreateCloudInstanceAction 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.executor.v1.CreateCloudInstanceAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CreateCloudInstanceAction 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.executor.v1.CreateCloudInstanceAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CreateCloudInstanceAction 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.executor.v1.CreateCloudInstanceAction 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; + } + /** + * + * + *
+   * Action that creates a Cloud Spanner instance.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CreateCloudInstanceAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CreateCloudInstanceAction) + com.google.spanner.executor.v1.CreateCloudInstanceActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 5: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CreateCloudInstanceAction.class, + com.google.spanner.executor.v1.CreateCloudInstanceAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.CreateCloudInstanceAction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAutoscalingConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceId_ = ""; + projectId_ = ""; + instanceConfigId_ = ""; + nodeCount_ = 0; + processingUnits_ = 0; + autoscalingConfig_ = null; + if (autoscalingConfigBuilder_ != null) { + autoscalingConfigBuilder_.dispose(); + autoscalingConfigBuilder_ = null; + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateCloudInstanceAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudInstanceAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.CreateCloudInstanceAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudInstanceAction build() { + com.google.spanner.executor.v1.CreateCloudInstanceAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CreateCloudInstanceAction buildPartial() { + com.google.spanner.executor.v1.CreateCloudInstanceAction result = + new com.google.spanner.executor.v1.CreateCloudInstanceAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.CreateCloudInstanceAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.instanceConfigId_ = instanceConfigId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.nodeCount_ = nodeCount_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.processingUnits_ = processingUnits_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.autoscalingConfig_ = + autoscalingConfigBuilder_ == null + ? autoscalingConfig_ + : autoscalingConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + result.bitField0_ |= to_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.executor.v1.CreateCloudInstanceAction) { + return mergeFrom((com.google.spanner.executor.v1.CreateCloudInstanceAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.CreateCloudInstanceAction other) { + if (other == com.google.spanner.executor.v1.CreateCloudInstanceAction.getDefaultInstance()) + return this; + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getInstanceConfigId().isEmpty()) { + instanceConfigId_ = other.instanceConfigId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasNodeCount()) { + setNodeCount(other.getNodeCount()); + } + if (other.hasProcessingUnits()) { + setProcessingUnits(other.getProcessingUnits()); + } + if (other.hasAutoscalingConfig()) { + mergeAutoscalingConfig(other.getAutoscalingConfig()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + 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: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + instanceConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + nodeCount_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 48: + { + processingUnits_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 48 + case 58: + { + input.readMessage( + getAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + 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 instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object instanceConfigId_ = ""; + /** + * + * + *
+     * Instance config ID, e.g. "test-config".
+     * 
+ * + * string instance_config_id = 3; + * + * @return The instanceConfigId. + */ + public java.lang.String getInstanceConfigId() { + java.lang.Object ref = instanceConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Instance config ID, e.g. "test-config".
+     * 
+ * + * string instance_config_id = 3; + * + * @return The bytes for instanceConfigId. + */ + public com.google.protobuf.ByteString getInstanceConfigIdBytes() { + java.lang.Object ref = instanceConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Instance config ID, e.g. "test-config".
+     * 
+ * + * string instance_config_id = 3; + * + * @param value The instanceConfigId to set. + * @return This builder for chaining. + */ + public Builder setInstanceConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceConfigId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Instance config ID, e.g. "test-config".
+     * 
+ * + * string instance_config_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearInstanceConfigId() { + instanceConfigId_ = getDefaultInstance().getInstanceConfigId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance config ID, e.g. "test-config".
+     * 
+ * + * string instance_config_id = 3; + * + * @param value The bytes for instanceConfigId to set. + * @return This builder for chaining. + */ + public Builder setInstanceConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceConfigId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int nodeCount_; + /** + * + * + *
+     * Number of nodes (processing_units should not be set or set to 0 if used).
+     * 
+ * + * optional int32 node_count = 4; + * + * @return Whether the nodeCount field is set. + */ + @java.lang.Override + public boolean hasNodeCount() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Number of nodes (processing_units should not be set or set to 0 if used).
+     * 
+ * + * optional int32 node_count = 4; + * + * @return The nodeCount. + */ + @java.lang.Override + public int getNodeCount() { + return nodeCount_; + } + /** + * + * + *
+     * Number of nodes (processing_units should not be set or set to 0 if used).
+     * 
+ * + * optional int32 node_count = 4; + * + * @param value The nodeCount to set. + * @return This builder for chaining. + */ + public Builder setNodeCount(int value) { + + nodeCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of nodes (processing_units should not be set or set to 0 if used).
+     * 
+ * + * optional int32 node_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearNodeCount() { + bitField0_ = (bitField0_ & ~0x00000008); + nodeCount_ = 0; + onChanged(); + return this; + } + + private int processingUnits_; + /** + * + * + *
+     * Number of processing units (node_count should be set to 0 if used).
+     * 
+ * + * optional int32 processing_units = 6; + * + * @return Whether the processingUnits field is set. + */ + @java.lang.Override + public boolean hasProcessingUnits() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Number of processing units (node_count should be set to 0 if used).
+     * 
+ * + * optional int32 processing_units = 6; + * + * @return The processingUnits. + */ + @java.lang.Override + public int getProcessingUnits() { + return processingUnits_; + } + /** + * + * + *
+     * Number of processing units (node_count should be set to 0 if used).
+     * 
+ * + * optional int32 processing_units = 6; + * + * @param value The processingUnits to set. + * @return This builder for chaining. + */ + public Builder setProcessingUnits(int value) { + + processingUnits_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of processing units (node_count should be set to 0 if used).
+     * 
+ * + * optional int32 processing_units = 6; + * + * @return This builder for chaining. + */ + public Builder clearProcessingUnits() { + bitField0_ = (bitField0_ & ~0x00000010); + processingUnits_ = 0; + onChanged(); + return this; + } + + private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig, + com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder> + autoscalingConfigBuilder_; + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, an autoscaling
+     * instance will be created (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + * + * @return Whether the autoscalingConfig field is set. + */ + public boolean hasAutoscalingConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, an autoscaling
+     * instance will be created (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + * + * @return The autoscalingConfig. + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig getAutoscalingConfig() { + if (autoscalingConfigBuilder_ == null) { + return autoscalingConfig_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance() + : autoscalingConfig_; + } else { + return autoscalingConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, an autoscaling
+     * instance will be created (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + public Builder setAutoscalingConfig( + com.google.spanner.admin.instance.v1.AutoscalingConfig value) { + if (autoscalingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoscalingConfig_ = value; + } else { + autoscalingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, an autoscaling
+     * instance will be created (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + public Builder setAutoscalingConfig( + com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder builderForValue) { + if (autoscalingConfigBuilder_ == null) { + autoscalingConfig_ = builderForValue.build(); + } else { + autoscalingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, an autoscaling
+     * instance will be created (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + public Builder mergeAutoscalingConfig( + com.google.spanner.admin.instance.v1.AutoscalingConfig value) { + if (autoscalingConfigBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && autoscalingConfig_ != null + && autoscalingConfig_ + != com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance()) { + getAutoscalingConfigBuilder().mergeFrom(value); + } else { + autoscalingConfig_ = value; + } + } else { + autoscalingConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, an autoscaling
+     * instance will be created (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + public Builder clearAutoscalingConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + autoscalingConfig_ = null; + if (autoscalingConfigBuilder_ != null) { + autoscalingConfigBuilder_.dispose(); + autoscalingConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, an autoscaling
+     * instance will be created (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder + getAutoscalingConfigBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getAutoscalingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, an autoscaling
+     * instance will be created (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder + getAutoscalingConfigOrBuilder() { + if (autoscalingConfigBuilder_ != null) { + return autoscalingConfigBuilder_.getMessageOrBuilder(); + } else { + return autoscalingConfig_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance() + : autoscalingConfig_; + } + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, an autoscaling
+     * instance will be created (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig, + com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder> + getAutoscalingConfigFieldBuilder() { + if (autoscalingConfigBuilder_ == null) { + autoscalingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig, + com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder>( + getAutoscalingConfig(), getParentForChildren(), isClean()); + autoscalingConfig_ = null; + } + return autoscalingConfigBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.CreateCloudInstanceAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.CreateCloudInstanceAction) + private static final com.google.spanner.executor.v1.CreateCloudInstanceAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.CreateCloudInstanceAction(); + } + + public static com.google.spanner.executor.v1.CreateCloudInstanceAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCloudInstanceAction 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.executor.v1.CreateCloudInstanceAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudInstanceActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudInstanceActionOrBuilder.java new file mode 100644 index 00000000000..ea178d0fc75 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateCloudInstanceActionOrBuilder.java @@ -0,0 +1,252 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface CreateCloudInstanceActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CreateCloudInstanceAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Instance config ID, e.g. "test-config".
+   * 
+ * + * string instance_config_id = 3; + * + * @return The instanceConfigId. + */ + java.lang.String getInstanceConfigId(); + /** + * + * + *
+   * Instance config ID, e.g. "test-config".
+   * 
+ * + * string instance_config_id = 3; + * + * @return The bytes for instanceConfigId. + */ + com.google.protobuf.ByteString getInstanceConfigIdBytes(); + + /** + * + * + *
+   * Number of nodes (processing_units should not be set or set to 0 if used).
+   * 
+ * + * optional int32 node_count = 4; + * + * @return Whether the nodeCount field is set. + */ + boolean hasNodeCount(); + /** + * + * + *
+   * Number of nodes (processing_units should not be set or set to 0 if used).
+   * 
+ * + * optional int32 node_count = 4; + * + * @return The nodeCount. + */ + int getNodeCount(); + + /** + * + * + *
+   * Number of processing units (node_count should be set to 0 if used).
+   * 
+ * + * optional int32 processing_units = 6; + * + * @return Whether the processingUnits field is set. + */ + boolean hasProcessingUnits(); + /** + * + * + *
+   * Number of processing units (node_count should be set to 0 if used).
+   * 
+ * + * optional int32 processing_units = 6; + * + * @return The processingUnits. + */ + int getProcessingUnits(); + + /** + * + * + *
+   * The autoscaling config for this instance. If non-empty, an autoscaling
+   * instance will be created (processing_units and node_count should be set to
+   * 0 if used).
+   * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + * + * @return Whether the autoscalingConfig field is set. + */ + boolean hasAutoscalingConfig(); + /** + * + * + *
+   * The autoscaling config for this instance. If non-empty, an autoscaling
+   * instance will be created (processing_units and node_count should be set to
+   * 0 if used).
+   * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + * + * @return The autoscalingConfig. + */ + com.google.spanner.admin.instance.v1.AutoscalingConfig getAutoscalingConfig(); + /** + * + * + *
+   * The autoscaling config for this instance. If non-empty, an autoscaling
+   * instance will be created (processing_units and node_count should be set to
+   * 0 if used).
+   * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder getAutoscalingConfigOrBuilder(); + + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 5; + */ + int getLabelsCount(); + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 5; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 5; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateUserInstanceConfigAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateUserInstanceConfigAction.java new file mode 100644 index 00000000000..2c38021fcd4 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateUserInstanceConfigAction.java @@ -0,0 +1,1491 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that creates a user instance config.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CreateUserInstanceConfigAction} + */ +public final class CreateUserInstanceConfigAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.CreateUserInstanceConfigAction) + CreateUserInstanceConfigActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateUserInstanceConfigAction.newBuilder() to construct. + private CreateUserInstanceConfigAction( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateUserInstanceConfigAction() { + userConfigId_ = ""; + projectId_ = ""; + baseConfigId_ = ""; + replicas_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateUserInstanceConfigAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CreateUserInstanceConfigAction.class, + com.google.spanner.executor.v1.CreateUserInstanceConfigAction.Builder.class); + } + + public static final int USER_CONFIG_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object userConfigId_ = ""; + /** + * + * + *
+   * User instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string user_config_id = 1; + * + * @return The userConfigId. + */ + @java.lang.Override + public java.lang.String getUserConfigId() { + java.lang.Object ref = userConfigId_; + 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(); + userConfigId_ = s; + return s; + } + } + /** + * + * + *
+   * User instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string user_config_id = 1; + * + * @return The bytes for userConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserConfigIdBytes() { + java.lang.Object ref = userConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE_CONFIG_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object baseConfigId_ = ""; + /** + * + * + *
+   * Base config ID, e.g. "test-config".
+   * 
+ * + * string base_config_id = 3; + * + * @return The baseConfigId. + */ + @java.lang.Override + public java.lang.String getBaseConfigId() { + java.lang.Object ref = baseConfigId_; + 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(); + baseConfigId_ = s; + return s; + } + } + /** + * + * + *
+   * Base config ID, e.g. "test-config".
+   * 
+ * + * string base_config_id = 3; + * + * @return The bytes for baseConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseConfigIdBytes() { + java.lang.Object ref = baseConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPLICAS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List replicas_; + /** + * + * + *
+   * Replicas that should be included in the user config.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + @java.lang.Override + public java.util.List getReplicasList() { + return replicas_; + } + /** + * + * + *
+   * Replicas that should be included in the user config.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + @java.lang.Override + public java.util.List + getReplicasOrBuilderList() { + return replicas_; + } + /** + * + * + *
+   * Replicas that should be included in the user config.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + @java.lang.Override + public int getReplicasCount() { + return replicas_.size(); + } + /** + * + * + *
+   * Replicas that should be included in the user config.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaInfo getReplicas(int index) { + return replicas_.get(index); + } + /** + * + * + *
+   * Replicas that should be included in the user config.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder getReplicasOrBuilder(int index) { + return replicas_.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(userConfigId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userConfigId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseConfigId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, baseConfigId_); + } + for (int i = 0; i < replicas_.size(); i++) { + output.writeMessage(4, replicas_.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(userConfigId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userConfigId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseConfigId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, baseConfigId_); + } + for (int i = 0; i < replicas_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, replicas_.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.executor.v1.CreateUserInstanceConfigAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.CreateUserInstanceConfigAction other = + (com.google.spanner.executor.v1.CreateUserInstanceConfigAction) obj; + + if (!getUserConfigId().equals(other.getUserConfigId())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getBaseConfigId().equals(other.getBaseConfigId())) return false; + if (!getReplicasList().equals(other.getReplicasList())) 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) + USER_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserConfigId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + BASE_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getBaseConfigId().hashCode(); + if (getReplicasCount() > 0) { + hash = (37 * hash) + REPLICAS_FIELD_NUMBER; + hash = (53 * hash) + getReplicasList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.CreateUserInstanceConfigAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CreateUserInstanceConfigAction 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.executor.v1.CreateUserInstanceConfigAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CreateUserInstanceConfigAction 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.executor.v1.CreateUserInstanceConfigAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.CreateUserInstanceConfigAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.CreateUserInstanceConfigAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CreateUserInstanceConfigAction 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.executor.v1.CreateUserInstanceConfigAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CreateUserInstanceConfigAction 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.executor.v1.CreateUserInstanceConfigAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.CreateUserInstanceConfigAction 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.executor.v1.CreateUserInstanceConfigAction 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; + } + /** + * + * + *
+   * Action that creates a user instance config.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.CreateUserInstanceConfigAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.CreateUserInstanceConfigAction) + com.google.spanner.executor.v1.CreateUserInstanceConfigActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.CreateUserInstanceConfigAction.class, + com.google.spanner.executor.v1.CreateUserInstanceConfigAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.CreateUserInstanceConfigAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userConfigId_ = ""; + projectId_ = ""; + baseConfigId_ = ""; + if (replicasBuilder_ == null) { + replicas_ = java.util.Collections.emptyList(); + } else { + replicas_ = null; + replicasBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_CreateUserInstanceConfigAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CreateUserInstanceConfigAction + getDefaultInstanceForType() { + return com.google.spanner.executor.v1.CreateUserInstanceConfigAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.CreateUserInstanceConfigAction build() { + com.google.spanner.executor.v1.CreateUserInstanceConfigAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.CreateUserInstanceConfigAction buildPartial() { + com.google.spanner.executor.v1.CreateUserInstanceConfigAction result = + new com.google.spanner.executor.v1.CreateUserInstanceConfigAction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.CreateUserInstanceConfigAction result) { + if (replicasBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + replicas_ = java.util.Collections.unmodifiableList(replicas_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.replicas_ = replicas_; + } else { + result.replicas_ = replicasBuilder_.build(); + } + } + + private void buildPartial0( + com.google.spanner.executor.v1.CreateUserInstanceConfigAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userConfigId_ = userConfigId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.baseConfigId_ = baseConfigId_; + } + } + + @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.executor.v1.CreateUserInstanceConfigAction) { + return mergeFrom((com.google.spanner.executor.v1.CreateUserInstanceConfigAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.CreateUserInstanceConfigAction other) { + if (other + == com.google.spanner.executor.v1.CreateUserInstanceConfigAction.getDefaultInstance()) + return this; + if (!other.getUserConfigId().isEmpty()) { + userConfigId_ = other.userConfigId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getBaseConfigId().isEmpty()) { + baseConfigId_ = other.baseConfigId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (replicasBuilder_ == null) { + if (!other.replicas_.isEmpty()) { + if (replicas_.isEmpty()) { + replicas_ = other.replicas_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureReplicasIsMutable(); + replicas_.addAll(other.replicas_); + } + onChanged(); + } + } else { + if (!other.replicas_.isEmpty()) { + if (replicasBuilder_.isEmpty()) { + replicasBuilder_.dispose(); + replicasBuilder_ = null; + replicas_ = other.replicas_; + bitField0_ = (bitField0_ & ~0x00000008); + replicasBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReplicasFieldBuilder() + : null; + } else { + replicasBuilder_.addAllMessages(other.replicas_); + } + } + } + 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: + { + userConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + baseConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.spanner.admin.instance.v1.ReplicaInfo m = + input.readMessage( + com.google.spanner.admin.instance.v1.ReplicaInfo.parser(), + extensionRegistry); + if (replicasBuilder_ == null) { + ensureReplicasIsMutable(); + replicas_.add(m); + } else { + replicasBuilder_.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 userConfigId_ = ""; + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @return The userConfigId. + */ + public java.lang.String getUserConfigId() { + java.lang.Object ref = userConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @return The bytes for userConfigId. + */ + public com.google.protobuf.ByteString getUserConfigIdBytes() { + java.lang.Object ref = userConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @param value The userConfigId to set. + * @return This builder for chaining. + */ + public Builder setUserConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userConfigId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearUserConfigId() { + userConfigId_ = getDefaultInstance().getUserConfigId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @param value The bytes for userConfigId to set. + * @return This builder for chaining. + */ + public Builder setUserConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userConfigId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object baseConfigId_ = ""; + /** + * + * + *
+     * Base config ID, e.g. "test-config".
+     * 
+ * + * string base_config_id = 3; + * + * @return The baseConfigId. + */ + public java.lang.String getBaseConfigId() { + java.lang.Object ref = baseConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Base config ID, e.g. "test-config".
+     * 
+ * + * string base_config_id = 3; + * + * @return The bytes for baseConfigId. + */ + public com.google.protobuf.ByteString getBaseConfigIdBytes() { + java.lang.Object ref = baseConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Base config ID, e.g. "test-config".
+     * 
+ * + * string base_config_id = 3; + * + * @param value The baseConfigId to set. + * @return This builder for chaining. + */ + public Builder setBaseConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + baseConfigId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Base config ID, e.g. "test-config".
+     * 
+ * + * string base_config_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearBaseConfigId() { + baseConfigId_ = getDefaultInstance().getBaseConfigId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Base config ID, e.g. "test-config".
+     * 
+ * + * string base_config_id = 3; + * + * @param value The bytes for baseConfigId to set. + * @return This builder for chaining. + */ + public Builder setBaseConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + baseConfigId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List replicas_ = + java.util.Collections.emptyList(); + + private void ensureReplicasIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + replicas_ = + new java.util.ArrayList(replicas_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.ReplicaInfo, + com.google.spanner.admin.instance.v1.ReplicaInfo.Builder, + com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder> + replicasBuilder_; + + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public java.util.List getReplicasList() { + if (replicasBuilder_ == null) { + return java.util.Collections.unmodifiableList(replicas_); + } else { + return replicasBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public int getReplicasCount() { + if (replicasBuilder_ == null) { + return replicas_.size(); + } else { + return replicasBuilder_.getCount(); + } + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public com.google.spanner.admin.instance.v1.ReplicaInfo getReplicas(int index) { + if (replicasBuilder_ == null) { + return replicas_.get(index); + } else { + return replicasBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public Builder setReplicas(int index, com.google.spanner.admin.instance.v1.ReplicaInfo value) { + if (replicasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicasIsMutable(); + replicas_.set(index, value); + onChanged(); + } else { + replicasBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public Builder setReplicas( + int index, com.google.spanner.admin.instance.v1.ReplicaInfo.Builder builderForValue) { + if (replicasBuilder_ == null) { + ensureReplicasIsMutable(); + replicas_.set(index, builderForValue.build()); + onChanged(); + } else { + replicasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public Builder addReplicas(com.google.spanner.admin.instance.v1.ReplicaInfo value) { + if (replicasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicasIsMutable(); + replicas_.add(value); + onChanged(); + } else { + replicasBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public Builder addReplicas(int index, com.google.spanner.admin.instance.v1.ReplicaInfo value) { + if (replicasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicasIsMutable(); + replicas_.add(index, value); + onChanged(); + } else { + replicasBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public Builder addReplicas( + com.google.spanner.admin.instance.v1.ReplicaInfo.Builder builderForValue) { + if (replicasBuilder_ == null) { + ensureReplicasIsMutable(); + replicas_.add(builderForValue.build()); + onChanged(); + } else { + replicasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public Builder addReplicas( + int index, com.google.spanner.admin.instance.v1.ReplicaInfo.Builder builderForValue) { + if (replicasBuilder_ == null) { + ensureReplicasIsMutable(); + replicas_.add(index, builderForValue.build()); + onChanged(); + } else { + replicasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public Builder addAllReplicas( + java.lang.Iterable values) { + if (replicasBuilder_ == null) { + ensureReplicasIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, replicas_); + onChanged(); + } else { + replicasBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public Builder clearReplicas() { + if (replicasBuilder_ == null) { + replicas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + replicasBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public Builder removeReplicas(int index) { + if (replicasBuilder_ == null) { + ensureReplicasIsMutable(); + replicas_.remove(index); + onChanged(); + } else { + replicasBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder getReplicasBuilder(int index) { + return getReplicasFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder getReplicasOrBuilder( + int index) { + if (replicasBuilder_ == null) { + return replicas_.get(index); + } else { + return replicasBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public java.util.List + getReplicasOrBuilderList() { + if (replicasBuilder_ != null) { + return replicasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(replicas_); + } + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addReplicasBuilder() { + return getReplicasFieldBuilder() + .addBuilder(com.google.spanner.admin.instance.v1.ReplicaInfo.getDefaultInstance()); + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public com.google.spanner.admin.instance.v1.ReplicaInfo.Builder addReplicasBuilder(int index) { + return getReplicasFieldBuilder() + .addBuilder(index, com.google.spanner.admin.instance.v1.ReplicaInfo.getDefaultInstance()); + } + /** + * + * + *
+     * Replicas that should be included in the user config.
+     * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + public java.util.List + getReplicasBuilderList() { + return getReplicasFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.ReplicaInfo, + com.google.spanner.admin.instance.v1.ReplicaInfo.Builder, + com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder> + getReplicasFieldBuilder() { + if (replicasBuilder_ == null) { + replicasBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.ReplicaInfo, + com.google.spanner.admin.instance.v1.ReplicaInfo.Builder, + com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder>( + replicas_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + replicas_ = null; + } + return replicasBuilder_; + } + + @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.executor.v1.CreateUserInstanceConfigAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.CreateUserInstanceConfigAction) + private static final com.google.spanner.executor.v1.CreateUserInstanceConfigAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.CreateUserInstanceConfigAction(); + } + + public static com.google.spanner.executor.v1.CreateUserInstanceConfigAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateUserInstanceConfigAction 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.executor.v1.CreateUserInstanceConfigAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateUserInstanceConfigActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateUserInstanceConfigActionOrBuilder.java new file mode 100644 index 00000000000..c439a37c934 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/CreateUserInstanceConfigActionOrBuilder.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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface CreateUserInstanceConfigActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.CreateUserInstanceConfigAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * User instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string user_config_id = 1; + * + * @return The userConfigId. + */ + java.lang.String getUserConfigId(); + /** + * + * + *
+   * User instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string user_config_id = 1; + * + * @return The bytes for userConfigId. + */ + com.google.protobuf.ByteString getUserConfigIdBytes(); + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Base config ID, e.g. "test-config".
+   * 
+ * + * string base_config_id = 3; + * + * @return The baseConfigId. + */ + java.lang.String getBaseConfigId(); + /** + * + * + *
+   * Base config ID, e.g. "test-config".
+   * 
+ * + * string base_config_id = 3; + * + * @return The bytes for baseConfigId. + */ + com.google.protobuf.ByteString getBaseConfigIdBytes(); + + /** + * + * + *
+   * Replicas that should be included in the user config.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + java.util.List getReplicasList(); + /** + * + * + *
+   * Replicas that should be included in the user config.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + com.google.spanner.admin.instance.v1.ReplicaInfo getReplicas(int index); + /** + * + * + *
+   * Replicas that should be included in the user config.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + int getReplicasCount(); + /** + * + * + *
+   * Replicas that should be included in the user config.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + java.util.List + getReplicasOrBuilderList(); + /** + * + * + *
+   * Replicas that should be included in the user config.
+   * 
+ * + * repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; + */ + com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder getReplicasOrBuilder(int index); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DataChangeRecord.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DataChangeRecord.java new file mode 100644 index 00000000000..dee22a9a6ad --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DataChangeRecord.java @@ -0,0 +1,5341 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * ChangeStream data change record.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DataChangeRecord} + */ +public final class DataChangeRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DataChangeRecord) + DataChangeRecordOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataChangeRecord.newBuilder() to construct. + private DataChangeRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataChangeRecord() { + recordSequence_ = ""; + transactionId_ = ""; + table_ = ""; + columnTypes_ = java.util.Collections.emptyList(); + mods_ = java.util.Collections.emptyList(); + modType_ = ""; + valueCaptureType_ = ""; + transactionTag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataChangeRecord(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DataChangeRecord.class, + com.google.spanner.executor.v1.DataChangeRecord.Builder.class); + } + + public interface ColumnTypeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DataChangeRecord.ColumnType) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Column name.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Column name.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Column type in JSON.
+     * 
+ * + * string type = 2; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+     * Column type in JSON.
+     * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+     * Whether the column is a primary key column.
+     * 
+ * + * bool is_primary_key = 3; + * + * @return The isPrimaryKey. + */ + boolean getIsPrimaryKey(); + + /** + * + * + *
+     * The position of the column as defined in the schema.
+     * 
+ * + * int64 ordinal_position = 4; + * + * @return The ordinalPosition. + */ + long getOrdinalPosition(); + } + /** + * + * + *
+   * Column types.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DataChangeRecord.ColumnType} + */ + public static final class ColumnType extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DataChangeRecord.ColumnType) + ColumnTypeOrBuilder { + private static final long serialVersionUID = 0L; + // Use ColumnType.newBuilder() to construct. + private ColumnType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ColumnType() { + name_ = ""; + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ColumnType(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.class, + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Column name.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Column name.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+     * Column type in JSON.
+     * 
+ * + * string type = 2; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + /** + * + * + *
+     * Column type in JSON.
+     * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_PRIMARY_KEY_FIELD_NUMBER = 3; + private boolean isPrimaryKey_ = false; + /** + * + * + *
+     * Whether the column is a primary key column.
+     * 
+ * + * bool is_primary_key = 3; + * + * @return The isPrimaryKey. + */ + @java.lang.Override + public boolean getIsPrimaryKey() { + return isPrimaryKey_; + } + + public static final int ORDINAL_POSITION_FIELD_NUMBER = 4; + private long ordinalPosition_ = 0L; + /** + * + * + *
+     * The position of the column as defined in the schema.
+     * 
+ * + * int64 ordinal_position = 4; + * + * @return The ordinalPosition. + */ + @java.lang.Override + public long getOrdinalPosition() { + return ordinalPosition_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + if (isPrimaryKey_ != false) { + output.writeBool(3, isPrimaryKey_); + } + if (ordinalPosition_ != 0L) { + output.writeInt64(4, ordinalPosition_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + if (isPrimaryKey_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isPrimaryKey_); + } + if (ordinalPosition_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, ordinalPosition_); + } + 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.executor.v1.DataChangeRecord.ColumnType)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.DataChangeRecord.ColumnType other = + (com.google.spanner.executor.v1.DataChangeRecord.ColumnType) obj; + + if (!getName().equals(other.getName())) return false; + if (!getType().equals(other.getType())) return false; + if (getIsPrimaryKey() != other.getIsPrimaryKey()) return false; + if (getOrdinalPosition() != other.getOrdinalPosition()) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + IS_PRIMARY_KEY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsPrimaryKey()); + hash = (37 * hash) + ORDINAL_POSITION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOrdinalPosition()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.DataChangeRecord.ColumnType parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.ColumnType 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.executor.v1.DataChangeRecord.ColumnType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.ColumnType 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.executor.v1.DataChangeRecord.ColumnType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.ColumnType parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.ColumnType parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.ColumnType 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.executor.v1.DataChangeRecord.ColumnType parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.ColumnType 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.executor.v1.DataChangeRecord.ColumnType parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.ColumnType 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.executor.v1.DataChangeRecord.ColumnType 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; + } + /** + * + * + *
+     * Column types.
+     * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DataChangeRecord.ColumnType} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DataChangeRecord.ColumnType) + com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.class, + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.DataChangeRecord.ColumnType.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + type_ = ""; + isPrimaryKey_ = false; + ordinalPosition_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_ColumnType_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord.ColumnType + getDefaultInstanceForType() { + return com.google.spanner.executor.v1.DataChangeRecord.ColumnType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord.ColumnType build() { + com.google.spanner.executor.v1.DataChangeRecord.ColumnType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord.ColumnType buildPartial() { + com.google.spanner.executor.v1.DataChangeRecord.ColumnType result = + new com.google.spanner.executor.v1.DataChangeRecord.ColumnType(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.executor.v1.DataChangeRecord.ColumnType result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.isPrimaryKey_ = isPrimaryKey_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ordinalPosition_ = ordinalPosition_; + } + } + + @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.executor.v1.DataChangeRecord.ColumnType) { + return mergeFrom((com.google.spanner.executor.v1.DataChangeRecord.ColumnType) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.DataChangeRecord.ColumnType other) { + if (other + == com.google.spanner.executor.v1.DataChangeRecord.ColumnType.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getIsPrimaryKey() != false) { + setIsPrimaryKey(other.getIsPrimaryKey()); + } + if (other.getOrdinalPosition() != 0L) { + setOrdinalPosition(other.getOrdinalPosition()); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + isPrimaryKey_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + ordinalPosition_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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 name_ = ""; + /** + * + * + *
+       * Column name.
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Column name.
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Column name.
+       * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Column name.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Column name.
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+       * Column type in JSON.
+       * 
+ * + * string type = 2; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Column type in JSON.
+       * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Column type in JSON.
+       * 
+ * + * string type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Column type in JSON.
+       * 
+ * + * string type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Column type in JSON.
+       * 
+ * + * string type = 2; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean isPrimaryKey_; + /** + * + * + *
+       * Whether the column is a primary key column.
+       * 
+ * + * bool is_primary_key = 3; + * + * @return The isPrimaryKey. + */ + @java.lang.Override + public boolean getIsPrimaryKey() { + return isPrimaryKey_; + } + /** + * + * + *
+       * Whether the column is a primary key column.
+       * 
+ * + * bool is_primary_key = 3; + * + * @param value The isPrimaryKey to set. + * @return This builder for chaining. + */ + public Builder setIsPrimaryKey(boolean value) { + + isPrimaryKey_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether the column is a primary key column.
+       * 
+ * + * bool is_primary_key = 3; + * + * @return This builder for chaining. + */ + public Builder clearIsPrimaryKey() { + bitField0_ = (bitField0_ & ~0x00000004); + isPrimaryKey_ = false; + onChanged(); + return this; + } + + private long ordinalPosition_; + /** + * + * + *
+       * The position of the column as defined in the schema.
+       * 
+ * + * int64 ordinal_position = 4; + * + * @return The ordinalPosition. + */ + @java.lang.Override + public long getOrdinalPosition() { + return ordinalPosition_; + } + /** + * + * + *
+       * The position of the column as defined in the schema.
+       * 
+ * + * int64 ordinal_position = 4; + * + * @param value The ordinalPosition to set. + * @return This builder for chaining. + */ + public Builder setOrdinalPosition(long value) { + + ordinalPosition_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The position of the column as defined in the schema.
+       * 
+ * + * int64 ordinal_position = 4; + * + * @return This builder for chaining. + */ + public Builder clearOrdinalPosition() { + bitField0_ = (bitField0_ & ~0x00000008); + ordinalPosition_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.DataChangeRecord.ColumnType) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.DataChangeRecord.ColumnType) + private static final com.google.spanner.executor.v1.DataChangeRecord.ColumnType + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.DataChangeRecord.ColumnType(); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.ColumnType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ColumnType 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.executor.v1.DataChangeRecord.ColumnType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ModOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DataChangeRecord.Mod) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The primary key values in JSON.
+     * 
+ * + * string keys = 1; + * + * @return The keys. + */ + java.lang.String getKeys(); + /** + * + * + *
+     * The primary key values in JSON.
+     * 
+ * + * string keys = 1; + * + * @return The bytes for keys. + */ + com.google.protobuf.ByteString getKeysBytes(); + + /** + * + * + *
+     * The new values of the changed columns in JSON. Only contain the non-key
+     * columns.
+     * 
+ * + * string new_values = 2; + * + * @return The newValues. + */ + java.lang.String getNewValues(); + /** + * + * + *
+     * The new values of the changed columns in JSON. Only contain the non-key
+     * columns.
+     * 
+ * + * string new_values = 2; + * + * @return The bytes for newValues. + */ + com.google.protobuf.ByteString getNewValuesBytes(); + + /** + * + * + *
+     * The old values of the changed columns in JSON. Only contain the non-key
+     * columns.
+     * 
+ * + * string old_values = 3; + * + * @return The oldValues. + */ + java.lang.String getOldValues(); + /** + * + * + *
+     * The old values of the changed columns in JSON. Only contain the non-key
+     * columns.
+     * 
+ * + * string old_values = 3; + * + * @return The bytes for oldValues. + */ + com.google.protobuf.ByteString getOldValuesBytes(); + } + /** + * + * + *
+   * Describes the changes that were made.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DataChangeRecord.Mod} + */ + public static final class Mod extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DataChangeRecord.Mod) + ModOrBuilder { + private static final long serialVersionUID = 0L; + // Use Mod.newBuilder() to construct. + private Mod(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Mod() { + keys_ = ""; + newValues_ = ""; + oldValues_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Mod(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DataChangeRecord.Mod.class, + com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder.class); + } + + public static final int KEYS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object keys_ = ""; + /** + * + * + *
+     * The primary key values in JSON.
+     * 
+ * + * string keys = 1; + * + * @return The keys. + */ + @java.lang.Override + public java.lang.String getKeys() { + java.lang.Object ref = keys_; + 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(); + keys_ = s; + return s; + } + } + /** + * + * + *
+     * The primary key values in JSON.
+     * 
+ * + * string keys = 1; + * + * @return The bytes for keys. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeysBytes() { + java.lang.Object ref = keys_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keys_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEW_VALUES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object newValues_ = ""; + /** + * + * + *
+     * The new values of the changed columns in JSON. Only contain the non-key
+     * columns.
+     * 
+ * + * string new_values = 2; + * + * @return The newValues. + */ + @java.lang.Override + public java.lang.String getNewValues() { + java.lang.Object ref = newValues_; + 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(); + newValues_ = s; + return s; + } + } + /** + * + * + *
+     * The new values of the changed columns in JSON. Only contain the non-key
+     * columns.
+     * 
+ * + * string new_values = 2; + * + * @return The bytes for newValues. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNewValuesBytes() { + java.lang.Object ref = newValues_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + newValues_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OLD_VALUES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object oldValues_ = ""; + /** + * + * + *
+     * The old values of the changed columns in JSON. Only contain the non-key
+     * columns.
+     * 
+ * + * string old_values = 3; + * + * @return The oldValues. + */ + @java.lang.Override + public java.lang.String getOldValues() { + java.lang.Object ref = oldValues_; + 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(); + oldValues_ = s; + return s; + } + } + /** + * + * + *
+     * The old values of the changed columns in JSON. Only contain the non-key
+     * columns.
+     * 
+ * + * string old_values = 3; + * + * @return The bytes for oldValues. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOldValuesBytes() { + java.lang.Object ref = oldValues_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oldValues_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(keys_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keys_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newValues_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, newValues_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(oldValues_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, oldValues_); + } + 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(keys_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keys_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newValues_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, newValues_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(oldValues_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, oldValues_); + } + 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.executor.v1.DataChangeRecord.Mod)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.DataChangeRecord.Mod other = + (com.google.spanner.executor.v1.DataChangeRecord.Mod) obj; + + if (!getKeys().equals(other.getKeys())) return false; + if (!getNewValues().equals(other.getNewValues())) return false; + if (!getOldValues().equals(other.getOldValues())) 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) + KEYS_FIELD_NUMBER; + hash = (53 * hash) + getKeys().hashCode(); + hash = (37 * hash) + NEW_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getNewValues().hashCode(); + hash = (37 * hash) + OLD_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getOldValues().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.DataChangeRecord.Mod parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.Mod 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.executor.v1.DataChangeRecord.Mod parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.Mod 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.executor.v1.DataChangeRecord.Mod parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.Mod parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.Mod parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.Mod 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.executor.v1.DataChangeRecord.Mod parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.Mod 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.executor.v1.DataChangeRecord.Mod parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.Mod 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.executor.v1.DataChangeRecord.Mod 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; + } + /** + * + * + *
+     * Describes the changes that were made.
+     * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DataChangeRecord.Mod} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DataChangeRecord.Mod) + com.google.spanner.executor.v1.DataChangeRecord.ModOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DataChangeRecord.Mod.class, + com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.DataChangeRecord.Mod.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keys_ = ""; + newValues_ = ""; + oldValues_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_Mod_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord.Mod getDefaultInstanceForType() { + return com.google.spanner.executor.v1.DataChangeRecord.Mod.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord.Mod build() { + com.google.spanner.executor.v1.DataChangeRecord.Mod result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord.Mod buildPartial() { + com.google.spanner.executor.v1.DataChangeRecord.Mod result = + new com.google.spanner.executor.v1.DataChangeRecord.Mod(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.DataChangeRecord.Mod result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keys_ = keys_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.newValues_ = newValues_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.oldValues_ = oldValues_; + } + } + + @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.executor.v1.DataChangeRecord.Mod) { + return mergeFrom((com.google.spanner.executor.v1.DataChangeRecord.Mod) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.DataChangeRecord.Mod other) { + if (other == com.google.spanner.executor.v1.DataChangeRecord.Mod.getDefaultInstance()) + return this; + if (!other.getKeys().isEmpty()) { + keys_ = other.keys_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getNewValues().isEmpty()) { + newValues_ = other.newValues_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOldValues().isEmpty()) { + oldValues_ = other.oldValues_; + bitField0_ |= 0x00000004; + onChanged(); + } + 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: + { + keys_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + newValues_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + oldValues_ = input.readStringRequireUtf8(); + 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 java.lang.Object keys_ = ""; + /** + * + * + *
+       * The primary key values in JSON.
+       * 
+ * + * string keys = 1; + * + * @return The keys. + */ + public java.lang.String getKeys() { + java.lang.Object ref = keys_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keys_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The primary key values in JSON.
+       * 
+ * + * string keys = 1; + * + * @return The bytes for keys. + */ + public com.google.protobuf.ByteString getKeysBytes() { + java.lang.Object ref = keys_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keys_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The primary key values in JSON.
+       * 
+ * + * string keys = 1; + * + * @param value The keys to set. + * @return This builder for chaining. + */ + public Builder setKeys(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keys_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The primary key values in JSON.
+       * 
+ * + * string keys = 1; + * + * @return This builder for chaining. + */ + public Builder clearKeys() { + keys_ = getDefaultInstance().getKeys(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The primary key values in JSON.
+       * 
+ * + * string keys = 1; + * + * @param value The bytes for keys to set. + * @return This builder for chaining. + */ + public Builder setKeysBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + keys_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object newValues_ = ""; + /** + * + * + *
+       * The new values of the changed columns in JSON. Only contain the non-key
+       * columns.
+       * 
+ * + * string new_values = 2; + * + * @return The newValues. + */ + public java.lang.String getNewValues() { + java.lang.Object ref = newValues_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newValues_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The new values of the changed columns in JSON. Only contain the non-key
+       * columns.
+       * 
+ * + * string new_values = 2; + * + * @return The bytes for newValues. + */ + public com.google.protobuf.ByteString getNewValuesBytes() { + java.lang.Object ref = newValues_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + newValues_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The new values of the changed columns in JSON. Only contain the non-key
+       * columns.
+       * 
+ * + * string new_values = 2; + * + * @param value The newValues to set. + * @return This builder for chaining. + */ + public Builder setNewValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + newValues_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The new values of the changed columns in JSON. Only contain the non-key
+       * columns.
+       * 
+ * + * string new_values = 2; + * + * @return This builder for chaining. + */ + public Builder clearNewValues() { + newValues_ = getDefaultInstance().getNewValues(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The new values of the changed columns in JSON. Only contain the non-key
+       * columns.
+       * 
+ * + * string new_values = 2; + * + * @param value The bytes for newValues to set. + * @return This builder for chaining. + */ + public Builder setNewValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + newValues_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object oldValues_ = ""; + /** + * + * + *
+       * The old values of the changed columns in JSON. Only contain the non-key
+       * columns.
+       * 
+ * + * string old_values = 3; + * + * @return The oldValues. + */ + public java.lang.String getOldValues() { + java.lang.Object ref = oldValues_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oldValues_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The old values of the changed columns in JSON. Only contain the non-key
+       * columns.
+       * 
+ * + * string old_values = 3; + * + * @return The bytes for oldValues. + */ + public com.google.protobuf.ByteString getOldValuesBytes() { + java.lang.Object ref = oldValues_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oldValues_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The old values of the changed columns in JSON. Only contain the non-key
+       * columns.
+       * 
+ * + * string old_values = 3; + * + * @param value The oldValues to set. + * @return This builder for chaining. + */ + public Builder setOldValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + oldValues_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The old values of the changed columns in JSON. Only contain the non-key
+       * columns.
+       * 
+ * + * string old_values = 3; + * + * @return This builder for chaining. + */ + public Builder clearOldValues() { + oldValues_ = getDefaultInstance().getOldValues(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The old values of the changed columns in JSON. Only contain the non-key
+       * columns.
+       * 
+ * + * string old_values = 3; + * + * @param value The bytes for oldValues to set. + * @return This builder for chaining. + */ + public Builder setOldValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + oldValues_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.DataChangeRecord.Mod) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.DataChangeRecord.Mod) + private static final com.google.spanner.executor.v1.DataChangeRecord.Mod DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.DataChangeRecord.Mod(); + } + + public static com.google.spanner.executor.v1.DataChangeRecord.Mod getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Mod 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.executor.v1.DataChangeRecord.Mod getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int COMMIT_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp commitTime_; + /** + * + * + *
+   * The timestamp in which the change was committed.
+   * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + * + * @return Whether the commitTime field is set. + */ + @java.lang.Override + public boolean hasCommitTime() { + return commitTime_ != null; + } + /** + * + * + *
+   * The timestamp in which the change was committed.
+   * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + * + * @return The commitTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCommitTime() { + return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_; + } + /** + * + * + *
+   * The timestamp in which the change was committed.
+   * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { + return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_; + } + + public static final int RECORD_SEQUENCE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object recordSequence_ = ""; + /** + * + * + *
+   * The sequence number for the record within the transaction.
+   * 
+ * + * string record_sequence = 2; + * + * @return The recordSequence. + */ + @java.lang.Override + public java.lang.String getRecordSequence() { + java.lang.Object ref = recordSequence_; + 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(); + recordSequence_ = s; + return s; + } + } + /** + * + * + *
+   * The sequence number for the record within the transaction.
+   * 
+ * + * string record_sequence = 2; + * + * @return The bytes for recordSequence. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRecordSequenceBytes() { + java.lang.Object ref = recordSequence_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + recordSequence_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSACTION_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object transactionId_ = ""; + /** + * + * + *
+   * A globally unique string that represents the transaction in which the
+   * change was committed.
+   * 
+ * + * string transaction_id = 3; + * + * @return The transactionId. + */ + @java.lang.Override + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + 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(); + transactionId_ = s; + return s; + } + } + /** + * + * + *
+   * A globally unique string that represents the transaction in which the
+   * change was committed.
+   * 
+ * + * string transaction_id = 3; + * + * @return The bytes for transactionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_LAST_RECORD_FIELD_NUMBER = 4; + private boolean isLastRecord_ = false; + /** + * + * + *
+   * Indicates whether this is the last record for a transaction in the current
+   * partition.
+   * 
+ * + * bool is_last_record = 4; + * + * @return The isLastRecord. + */ + @java.lang.Override + public boolean getIsLastRecord() { + return isLastRecord_; + } + + public static final int TABLE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object table_ = ""; + /** + * + * + *
+   * Name of the table affected by the change.
+   * 
+ * + * string table = 5; + * + * @return The table. + */ + @java.lang.Override + public java.lang.String getTable() { + java.lang.Object ref = table_; + 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(); + table_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the table affected by the change.
+   * 
+ * + * string table = 5; + * + * @return The bytes for table. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLUMN_TYPES_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List columnTypes_; + /** + * + * + *
+   * Column types defined in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + */ + @java.lang.Override + public java.util.List + getColumnTypesList() { + return columnTypes_; + } + /** + * + * + *
+   * Column types defined in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder> + getColumnTypesOrBuilderList() { + return columnTypes_; + } + /** + * + * + *
+   * Column types defined in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + */ + @java.lang.Override + public int getColumnTypesCount() { + return columnTypes_.size(); + } + /** + * + * + *
+   * Column types defined in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord.ColumnType getColumnTypes(int index) { + return columnTypes_.get(index); + } + /** + * + * + *
+   * Column types defined in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder + getColumnTypesOrBuilder(int index) { + return columnTypes_.get(index); + } + + public static final int MODS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List mods_; + /** + * + * + *
+   * Changes made in the transaction.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + @java.lang.Override + public java.util.List getModsList() { + return mods_; + } + /** + * + * + *
+   * Changes made in the transaction.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + @java.lang.Override + public java.util.List + getModsOrBuilderList() { + return mods_; + } + /** + * + * + *
+   * Changes made in the transaction.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + @java.lang.Override + public int getModsCount() { + return mods_.size(); + } + /** + * + * + *
+   * Changes made in the transaction.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord.Mod getMods(int index) { + return mods_.get(index); + } + /** + * + * + *
+   * Changes made in the transaction.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord.ModOrBuilder getModsOrBuilder(int index) { + return mods_.get(index); + } + + public static final int MOD_TYPE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object modType_ = ""; + /** + * + * + *
+   * Describes the type of change. One of INSERT, UPDATE or DELETE.
+   * 
+ * + * string mod_type = 8; + * + * @return The modType. + */ + @java.lang.Override + public java.lang.String getModType() { + java.lang.Object ref = modType_; + 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(); + modType_ = s; + return s; + } + } + /** + * + * + *
+   * Describes the type of change. One of INSERT, UPDATE or DELETE.
+   * 
+ * + * string mod_type = 8; + * + * @return The bytes for modType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModTypeBytes() { + java.lang.Object ref = modType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_CAPTURE_TYPE_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object valueCaptureType_ = ""; + /** + * + * + *
+   * One of value capture type: NEW_VALUES, OLD_VALUES, OLD_AND_NEW_VALUES.
+   * 
+ * + * string value_capture_type = 9; + * + * @return The valueCaptureType. + */ + @java.lang.Override + public java.lang.String getValueCaptureType() { + java.lang.Object ref = valueCaptureType_; + 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(); + valueCaptureType_ = s; + return s; + } + } + /** + * + * + *
+   * One of value capture type: NEW_VALUES, OLD_VALUES, OLD_AND_NEW_VALUES.
+   * 
+ * + * string value_capture_type = 9; + * + * @return The bytes for valueCaptureType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueCaptureTypeBytes() { + java.lang.Object ref = valueCaptureType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + valueCaptureType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECORD_COUNT_FIELD_NUMBER = 10; + private long recordCount_ = 0L; + /** + * + * + *
+   * Number of records in transactions.
+   * 
+ * + * int64 record_count = 10; + * + * @return The recordCount. + */ + @java.lang.Override + public long getRecordCount() { + return recordCount_; + } + + public static final int PARTITION_COUNT_FIELD_NUMBER = 11; + private long partitionCount_ = 0L; + /** + * + * + *
+   * Number of partitions in transactions.
+   * 
+ * + * int64 partition_count = 11; + * + * @return The partitionCount. + */ + @java.lang.Override + public long getPartitionCount() { + return partitionCount_; + } + + public static final int TRANSACTION_TAG_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object transactionTag_ = ""; + /** + * + * + *
+   * Transaction tag info.
+   * 
+ * + * string transaction_tag = 12; + * + * @return The transactionTag. + */ + @java.lang.Override + public java.lang.String getTransactionTag() { + java.lang.Object ref = transactionTag_; + 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(); + transactionTag_ = s; + return s; + } + } + /** + * + * + *
+   * Transaction tag info.
+   * 
+ * + * string transaction_tag = 12; + * + * @return The bytes for transactionTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTransactionTagBytes() { + java.lang.Object ref = transactionTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transactionTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_SYSTEM_TRANSACTION_FIELD_NUMBER = 13; + private boolean isSystemTransaction_ = false; + /** + * + * + *
+   * Whether the transaction is a system transactionn.
+   * 
+ * + * bool is_system_transaction = 13; + * + * @return The isSystemTransaction. + */ + @java.lang.Override + public boolean getIsSystemTransaction() { + return isSystemTransaction_; + } + + 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 (commitTime_ != null) { + output.writeMessage(1, getCommitTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordSequence_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, transactionId_); + } + if (isLastRecord_ != false) { + output.writeBool(4, isLastRecord_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, table_); + } + for (int i = 0; i < columnTypes_.size(); i++) { + output.writeMessage(6, columnTypes_.get(i)); + } + for (int i = 0; i < mods_.size(); i++) { + output.writeMessage(7, mods_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, modType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueCaptureType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, valueCaptureType_); + } + if (recordCount_ != 0L) { + output.writeInt64(10, recordCount_); + } + if (partitionCount_ != 0L) { + output.writeInt64(11, partitionCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionTag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, transactionTag_); + } + if (isSystemTransaction_ != false) { + output.writeBool(13, isSystemTransaction_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (commitTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommitTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recordSequence_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, transactionId_); + } + if (isLastRecord_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, isLastRecord_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, table_); + } + for (int i = 0; i < columnTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, columnTypes_.get(i)); + } + for (int i = 0; i < mods_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, mods_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, modType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valueCaptureType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, valueCaptureType_); + } + if (recordCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(10, recordCount_); + } + if (partitionCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(11, partitionCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionTag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, transactionTag_); + } + if (isSystemTransaction_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, isSystemTransaction_); + } + 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.executor.v1.DataChangeRecord)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.DataChangeRecord other = + (com.google.spanner.executor.v1.DataChangeRecord) obj; + + if (hasCommitTime() != other.hasCommitTime()) return false; + if (hasCommitTime()) { + if (!getCommitTime().equals(other.getCommitTime())) return false; + } + if (!getRecordSequence().equals(other.getRecordSequence())) return false; + if (!getTransactionId().equals(other.getTransactionId())) return false; + if (getIsLastRecord() != other.getIsLastRecord()) return false; + if (!getTable().equals(other.getTable())) return false; + if (!getColumnTypesList().equals(other.getColumnTypesList())) return false; + if (!getModsList().equals(other.getModsList())) return false; + if (!getModType().equals(other.getModType())) return false; + if (!getValueCaptureType().equals(other.getValueCaptureType())) return false; + if (getRecordCount() != other.getRecordCount()) return false; + if (getPartitionCount() != other.getPartitionCount()) return false; + if (!getTransactionTag().equals(other.getTransactionTag())) return false; + if (getIsSystemTransaction() != other.getIsSystemTransaction()) 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 (hasCommitTime()) { + hash = (37 * hash) + COMMIT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCommitTime().hashCode(); + } + hash = (37 * hash) + RECORD_SEQUENCE_FIELD_NUMBER; + hash = (53 * hash) + getRecordSequence().hashCode(); + hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getTransactionId().hashCode(); + hash = (37 * hash) + IS_LAST_RECORD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsLastRecord()); + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + if (getColumnTypesCount() > 0) { + hash = (37 * hash) + COLUMN_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getColumnTypesList().hashCode(); + } + if (getModsCount() > 0) { + hash = (37 * hash) + MODS_FIELD_NUMBER; + hash = (53 * hash) + getModsList().hashCode(); + } + hash = (37 * hash) + MOD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getModType().hashCode(); + hash = (37 * hash) + VALUE_CAPTURE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getValueCaptureType().hashCode(); + hash = (37 * hash) + RECORD_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRecordCount()); + hash = (37 * hash) + PARTITION_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPartitionCount()); + hash = (37 * hash) + TRANSACTION_TAG_FIELD_NUMBER; + hash = (53 * hash) + getTransactionTag().hashCode(); + hash = (37 * hash) + IS_SYSTEM_TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsSystemTransaction()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.DataChangeRecord parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DataChangeRecord 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.executor.v1.DataChangeRecord parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DataChangeRecord 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.executor.v1.DataChangeRecord parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DataChangeRecord parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.DataChangeRecord parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DataChangeRecord 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.executor.v1.DataChangeRecord parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DataChangeRecord 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.executor.v1.DataChangeRecord parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DataChangeRecord 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.executor.v1.DataChangeRecord 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; + } + /** + * + * + *
+   * ChangeStream data change record.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DataChangeRecord} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DataChangeRecord) + com.google.spanner.executor.v1.DataChangeRecordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DataChangeRecord.class, + com.google.spanner.executor.v1.DataChangeRecord.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.DataChangeRecord.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + commitTime_ = null; + if (commitTimeBuilder_ != null) { + commitTimeBuilder_.dispose(); + commitTimeBuilder_ = null; + } + recordSequence_ = ""; + transactionId_ = ""; + isLastRecord_ = false; + table_ = ""; + if (columnTypesBuilder_ == null) { + columnTypes_ = java.util.Collections.emptyList(); + } else { + columnTypes_ = null; + columnTypesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (modsBuilder_ == null) { + mods_ = java.util.Collections.emptyList(); + } else { + mods_ = null; + modsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + modType_ = ""; + valueCaptureType_ = ""; + recordCount_ = 0L; + partitionCount_ = 0L; + transactionTag_ = ""; + isSystemTransaction_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DataChangeRecord_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord getDefaultInstanceForType() { + return com.google.spanner.executor.v1.DataChangeRecord.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord build() { + com.google.spanner.executor.v1.DataChangeRecord result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DataChangeRecord buildPartial() { + com.google.spanner.executor.v1.DataChangeRecord result = + new com.google.spanner.executor.v1.DataChangeRecord(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.DataChangeRecord result) { + if (columnTypesBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + columnTypes_ = java.util.Collections.unmodifiableList(columnTypes_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.columnTypes_ = columnTypes_; + } else { + result.columnTypes_ = columnTypesBuilder_.build(); + } + if (modsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + mods_ = java.util.Collections.unmodifiableList(mods_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.mods_ = mods_; + } else { + result.mods_ = modsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.DataChangeRecord result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.commitTime_ = commitTimeBuilder_ == null ? commitTime_ : commitTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.recordSequence_ = recordSequence_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.transactionId_ = transactionId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.isLastRecord_ = isLastRecord_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.table_ = table_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.modType_ = modType_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.valueCaptureType_ = valueCaptureType_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.recordCount_ = recordCount_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.partitionCount_ = partitionCount_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.transactionTag_ = transactionTag_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.isSystemTransaction_ = isSystemTransaction_; + } + } + + @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.executor.v1.DataChangeRecord) { + return mergeFrom((com.google.spanner.executor.v1.DataChangeRecord) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.DataChangeRecord other) { + if (other == com.google.spanner.executor.v1.DataChangeRecord.getDefaultInstance()) + return this; + if (other.hasCommitTime()) { + mergeCommitTime(other.getCommitTime()); + } + if (!other.getRecordSequence().isEmpty()) { + recordSequence_ = other.recordSequence_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTransactionId().isEmpty()) { + transactionId_ = other.transactionId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getIsLastRecord() != false) { + setIsLastRecord(other.getIsLastRecord()); + } + if (!other.getTable().isEmpty()) { + table_ = other.table_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (columnTypesBuilder_ == null) { + if (!other.columnTypes_.isEmpty()) { + if (columnTypes_.isEmpty()) { + columnTypes_ = other.columnTypes_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureColumnTypesIsMutable(); + columnTypes_.addAll(other.columnTypes_); + } + onChanged(); + } + } else { + if (!other.columnTypes_.isEmpty()) { + if (columnTypesBuilder_.isEmpty()) { + columnTypesBuilder_.dispose(); + columnTypesBuilder_ = null; + columnTypes_ = other.columnTypes_; + bitField0_ = (bitField0_ & ~0x00000020); + columnTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getColumnTypesFieldBuilder() + : null; + } else { + columnTypesBuilder_.addAllMessages(other.columnTypes_); + } + } + } + if (modsBuilder_ == null) { + if (!other.mods_.isEmpty()) { + if (mods_.isEmpty()) { + mods_ = other.mods_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureModsIsMutable(); + mods_.addAll(other.mods_); + } + onChanged(); + } + } else { + if (!other.mods_.isEmpty()) { + if (modsBuilder_.isEmpty()) { + modsBuilder_.dispose(); + modsBuilder_ = null; + mods_ = other.mods_; + bitField0_ = (bitField0_ & ~0x00000040); + modsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getModsFieldBuilder() + : null; + } else { + modsBuilder_.addAllMessages(other.mods_); + } + } + } + if (!other.getModType().isEmpty()) { + modType_ = other.modType_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getValueCaptureType().isEmpty()) { + valueCaptureType_ = other.valueCaptureType_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.getRecordCount() != 0L) { + setRecordCount(other.getRecordCount()); + } + if (other.getPartitionCount() != 0L) { + setPartitionCount(other.getPartitionCount()); + } + if (!other.getTransactionTag().isEmpty()) { + transactionTag_ = other.transactionTag_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.getIsSystemTransaction() != false) { + setIsSystemTransaction(other.getIsSystemTransaction()); + } + 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: + { + input.readMessage(getCommitTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + recordSequence_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + transactionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + isLastRecord_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + table_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + com.google.spanner.executor.v1.DataChangeRecord.ColumnType m = + input.readMessage( + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.parser(), + extensionRegistry); + if (columnTypesBuilder_ == null) { + ensureColumnTypesIsMutable(); + columnTypes_.add(m); + } else { + columnTypesBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + com.google.spanner.executor.v1.DataChangeRecord.Mod m = + input.readMessage( + com.google.spanner.executor.v1.DataChangeRecord.Mod.parser(), + extensionRegistry); + if (modsBuilder_ == null) { + ensureModsIsMutable(); + mods_.add(m); + } else { + modsBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: + { + modType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + valueCaptureType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: + { + recordCount_ = input.readInt64(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: + { + partitionCount_ = input.readInt64(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: + { + transactionTag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 104: + { + isSystemTransaction_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 104 + 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.Timestamp commitTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + commitTimeBuilder_; + /** + * + * + *
+     * The timestamp in which the change was committed.
+     * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + * + * @return Whether the commitTime field is set. + */ + public boolean hasCommitTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The timestamp in which the change was committed.
+     * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + * + * @return The commitTime. + */ + public com.google.protobuf.Timestamp getCommitTime() { + if (commitTimeBuilder_ == null) { + return commitTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitTime_; + } else { + return commitTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The timestamp in which the change was committed.
+     * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + */ + public Builder setCommitTime(com.google.protobuf.Timestamp value) { + if (commitTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commitTime_ = value; + } else { + commitTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp in which the change was committed.
+     * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + */ + public Builder setCommitTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (commitTimeBuilder_ == null) { + commitTime_ = builderForValue.build(); + } else { + commitTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp in which the change was committed.
+     * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + */ + public Builder mergeCommitTime(com.google.protobuf.Timestamp value) { + if (commitTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && commitTime_ != null + && commitTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCommitTimeBuilder().mergeFrom(value); + } else { + commitTime_ = value; + } + } else { + commitTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp in which the change was committed.
+     * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + */ + public Builder clearCommitTime() { + bitField0_ = (bitField0_ & ~0x00000001); + commitTime_ = null; + if (commitTimeBuilder_ != null) { + commitTimeBuilder_.dispose(); + commitTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp in which the change was committed.
+     * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCommitTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommitTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The timestamp in which the change was committed.
+     * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { + if (commitTimeBuilder_ != null) { + return commitTimeBuilder_.getMessageOrBuilder(); + } else { + return commitTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitTime_; + } + } + /** + * + * + *
+     * The timestamp in which the change was committed.
+     * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCommitTimeFieldBuilder() { + if (commitTimeBuilder_ == null) { + commitTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCommitTime(), getParentForChildren(), isClean()); + commitTime_ = null; + } + return commitTimeBuilder_; + } + + private java.lang.Object recordSequence_ = ""; + /** + * + * + *
+     * The sequence number for the record within the transaction.
+     * 
+ * + * string record_sequence = 2; + * + * @return The recordSequence. + */ + public java.lang.String getRecordSequence() { + java.lang.Object ref = recordSequence_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + recordSequence_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The sequence number for the record within the transaction.
+     * 
+ * + * string record_sequence = 2; + * + * @return The bytes for recordSequence. + */ + public com.google.protobuf.ByteString getRecordSequenceBytes() { + java.lang.Object ref = recordSequence_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + recordSequence_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The sequence number for the record within the transaction.
+     * 
+ * + * string record_sequence = 2; + * + * @param value The recordSequence to set. + * @return This builder for chaining. + */ + public Builder setRecordSequence(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + recordSequence_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The sequence number for the record within the transaction.
+     * 
+ * + * string record_sequence = 2; + * + * @return This builder for chaining. + */ + public Builder clearRecordSequence() { + recordSequence_ = getDefaultInstance().getRecordSequence(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The sequence number for the record within the transaction.
+     * 
+ * + * string record_sequence = 2; + * + * @param value The bytes for recordSequence to set. + * @return This builder for chaining. + */ + public Builder setRecordSequenceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + recordSequence_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object transactionId_ = ""; + /** + * + * + *
+     * A globally unique string that represents the transaction in which the
+     * change was committed.
+     * 
+ * + * string transaction_id = 3; + * + * @return The transactionId. + */ + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A globally unique string that represents the transaction in which the
+     * change was committed.
+     * 
+ * + * string transaction_id = 3; + * + * @return The bytes for transactionId. + */ + public com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A globally unique string that represents the transaction in which the
+     * change was committed.
+     * 
+ * + * string transaction_id = 3; + * + * @param value The transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + transactionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A globally unique string that represents the transaction in which the
+     * change was committed.
+     * 
+ * + * string transaction_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearTransactionId() { + transactionId_ = getDefaultInstance().getTransactionId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A globally unique string that represents the transaction in which the
+     * change was committed.
+     * 
+ * + * string transaction_id = 3; + * + * @param value The bytes for transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + transactionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean isLastRecord_; + /** + * + * + *
+     * Indicates whether this is the last record for a transaction in the current
+     * partition.
+     * 
+ * + * bool is_last_record = 4; + * + * @return The isLastRecord. + */ + @java.lang.Override + public boolean getIsLastRecord() { + return isLastRecord_; + } + /** + * + * + *
+     * Indicates whether this is the last record for a transaction in the current
+     * partition.
+     * 
+ * + * bool is_last_record = 4; + * + * @param value The isLastRecord to set. + * @return This builder for chaining. + */ + public Builder setIsLastRecord(boolean value) { + + isLastRecord_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates whether this is the last record for a transaction in the current
+     * partition.
+     * 
+ * + * bool is_last_record = 4; + * + * @return This builder for chaining. + */ + public Builder clearIsLastRecord() { + bitField0_ = (bitField0_ & ~0x00000008); + isLastRecord_ = false; + onChanged(); + return this; + } + + private java.lang.Object table_ = ""; + /** + * + * + *
+     * Name of the table affected by the change.
+     * 
+ * + * string table = 5; + * + * @return The table. + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the table affected by the change.
+     * 
+ * + * string table = 5; + * + * @return The bytes for table. + */ + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the table affected by the change.
+     * 
+ * + * string table = 5; + * + * @param value The table to set. + * @return This builder for chaining. + */ + public Builder setTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the table affected by the change.
+     * 
+ * + * string table = 5; + * + * @return This builder for chaining. + */ + public Builder clearTable() { + table_ = getDefaultInstance().getTable(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the table affected by the change.
+     * 
+ * + * string table = 5; + * + * @param value The bytes for table to set. + * @return This builder for chaining. + */ + public Builder setTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + table_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.util.List + columnTypes_ = java.util.Collections.emptyList(); + + private void ensureColumnTypesIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + columnTypes_ = + new java.util.ArrayList( + columnTypes_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.DataChangeRecord.ColumnType, + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder, + com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder> + columnTypesBuilder_; + + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public java.util.List + getColumnTypesList() { + if (columnTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(columnTypes_); + } else { + return columnTypesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public int getColumnTypesCount() { + if (columnTypesBuilder_ == null) { + return columnTypes_.size(); + } else { + return columnTypesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public com.google.spanner.executor.v1.DataChangeRecord.ColumnType getColumnTypes(int index) { + if (columnTypesBuilder_ == null) { + return columnTypes_.get(index); + } else { + return columnTypesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public Builder setColumnTypes( + int index, com.google.spanner.executor.v1.DataChangeRecord.ColumnType value) { + if (columnTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnTypesIsMutable(); + columnTypes_.set(index, value); + onChanged(); + } else { + columnTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public Builder setColumnTypes( + int index, + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder builderForValue) { + if (columnTypesBuilder_ == null) { + ensureColumnTypesIsMutable(); + columnTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + columnTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public Builder addColumnTypes( + com.google.spanner.executor.v1.DataChangeRecord.ColumnType value) { + if (columnTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnTypesIsMutable(); + columnTypes_.add(value); + onChanged(); + } else { + columnTypesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public Builder addColumnTypes( + int index, com.google.spanner.executor.v1.DataChangeRecord.ColumnType value) { + if (columnTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnTypesIsMutable(); + columnTypes_.add(index, value); + onChanged(); + } else { + columnTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public Builder addColumnTypes( + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder builderForValue) { + if (columnTypesBuilder_ == null) { + ensureColumnTypesIsMutable(); + columnTypes_.add(builderForValue.build()); + onChanged(); + } else { + columnTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public Builder addColumnTypes( + int index, + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder builderForValue) { + if (columnTypesBuilder_ == null) { + ensureColumnTypesIsMutable(); + columnTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + columnTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public Builder addAllColumnTypes( + java.lang.Iterable + values) { + if (columnTypesBuilder_ == null) { + ensureColumnTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, columnTypes_); + onChanged(); + } else { + columnTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public Builder clearColumnTypes() { + if (columnTypesBuilder_ == null) { + columnTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + columnTypesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public Builder removeColumnTypes(int index) { + if (columnTypesBuilder_ == null) { + ensureColumnTypesIsMutable(); + columnTypes_.remove(index); + onChanged(); + } else { + columnTypesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder getColumnTypesBuilder( + int index) { + return getColumnTypesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder + getColumnTypesOrBuilder(int index) { + if (columnTypesBuilder_ == null) { + return columnTypes_.get(index); + } else { + return columnTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public java.util.List< + ? extends com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder> + getColumnTypesOrBuilderList() { + if (columnTypesBuilder_ != null) { + return columnTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(columnTypes_); + } + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder + addColumnTypesBuilder() { + return getColumnTypesFieldBuilder() + .addBuilder( + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.getDefaultInstance()); + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder addColumnTypesBuilder( + int index) { + return getColumnTypesFieldBuilder() + .addBuilder( + index, + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.getDefaultInstance()); + } + /** + * + * + *
+     * Column types defined in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + * + */ + public java.util.List + getColumnTypesBuilderList() { + return getColumnTypesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.DataChangeRecord.ColumnType, + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder, + com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder> + getColumnTypesFieldBuilder() { + if (columnTypesBuilder_ == null) { + columnTypesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.DataChangeRecord.ColumnType, + com.google.spanner.executor.v1.DataChangeRecord.ColumnType.Builder, + com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder>( + columnTypes_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + columnTypes_ = null; + } + return columnTypesBuilder_; + } + + private java.util.List mods_ = + java.util.Collections.emptyList(); + + private void ensureModsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + mods_ = new java.util.ArrayList(mods_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.DataChangeRecord.Mod, + com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder, + com.google.spanner.executor.v1.DataChangeRecord.ModOrBuilder> + modsBuilder_; + + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public java.util.List getModsList() { + if (modsBuilder_ == null) { + return java.util.Collections.unmodifiableList(mods_); + } else { + return modsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public int getModsCount() { + if (modsBuilder_ == null) { + return mods_.size(); + } else { + return modsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public com.google.spanner.executor.v1.DataChangeRecord.Mod getMods(int index) { + if (modsBuilder_ == null) { + return mods_.get(index); + } else { + return modsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public Builder setMods(int index, com.google.spanner.executor.v1.DataChangeRecord.Mod value) { + if (modsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModsIsMutable(); + mods_.set(index, value); + onChanged(); + } else { + modsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public Builder setMods( + int index, com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder builderForValue) { + if (modsBuilder_ == null) { + ensureModsIsMutable(); + mods_.set(index, builderForValue.build()); + onChanged(); + } else { + modsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public Builder addMods(com.google.spanner.executor.v1.DataChangeRecord.Mod value) { + if (modsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModsIsMutable(); + mods_.add(value); + onChanged(); + } else { + modsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public Builder addMods(int index, com.google.spanner.executor.v1.DataChangeRecord.Mod value) { + if (modsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModsIsMutable(); + mods_.add(index, value); + onChanged(); + } else { + modsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public Builder addMods( + com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder builderForValue) { + if (modsBuilder_ == null) { + ensureModsIsMutable(); + mods_.add(builderForValue.build()); + onChanged(); + } else { + modsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public Builder addMods( + int index, com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder builderForValue) { + if (modsBuilder_ == null) { + ensureModsIsMutable(); + mods_.add(index, builderForValue.build()); + onChanged(); + } else { + modsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public Builder addAllMods( + java.lang.Iterable values) { + if (modsBuilder_ == null) { + ensureModsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mods_); + onChanged(); + } else { + modsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public Builder clearMods() { + if (modsBuilder_ == null) { + mods_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + modsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public Builder removeMods(int index) { + if (modsBuilder_ == null) { + ensureModsIsMutable(); + mods_.remove(index); + onChanged(); + } else { + modsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder getModsBuilder(int index) { + return getModsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public com.google.spanner.executor.v1.DataChangeRecord.ModOrBuilder getModsOrBuilder( + int index) { + if (modsBuilder_ == null) { + return mods_.get(index); + } else { + return modsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public java.util.List + getModsOrBuilderList() { + if (modsBuilder_ != null) { + return modsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mods_); + } + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder addModsBuilder() { + return getModsFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.DataChangeRecord.Mod.getDefaultInstance()); + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder addModsBuilder(int index) { + return getModsFieldBuilder() + .addBuilder( + index, com.google.spanner.executor.v1.DataChangeRecord.Mod.getDefaultInstance()); + } + /** + * + * + *
+     * Changes made in the transaction.
+     * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + public java.util.List + getModsBuilderList() { + return getModsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.DataChangeRecord.Mod, + com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder, + com.google.spanner.executor.v1.DataChangeRecord.ModOrBuilder> + getModsFieldBuilder() { + if (modsBuilder_ == null) { + modsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.DataChangeRecord.Mod, + com.google.spanner.executor.v1.DataChangeRecord.Mod.Builder, + com.google.spanner.executor.v1.DataChangeRecord.ModOrBuilder>( + mods_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + mods_ = null; + } + return modsBuilder_; + } + + private java.lang.Object modType_ = ""; + /** + * + * + *
+     * Describes the type of change. One of INSERT, UPDATE or DELETE.
+     * 
+ * + * string mod_type = 8; + * + * @return The modType. + */ + public java.lang.String getModType() { + java.lang.Object ref = modType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Describes the type of change. One of INSERT, UPDATE or DELETE.
+     * 
+ * + * string mod_type = 8; + * + * @return The bytes for modType. + */ + public com.google.protobuf.ByteString getModTypeBytes() { + java.lang.Object ref = modType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Describes the type of change. One of INSERT, UPDATE or DELETE.
+     * 
+ * + * string mod_type = 8; + * + * @param value The modType to set. + * @return This builder for chaining. + */ + public Builder setModType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + modType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Describes the type of change. One of INSERT, UPDATE or DELETE.
+     * 
+ * + * string mod_type = 8; + * + * @return This builder for chaining. + */ + public Builder clearModType() { + modType_ = getDefaultInstance().getModType(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes the type of change. One of INSERT, UPDATE or DELETE.
+     * 
+ * + * string mod_type = 8; + * + * @param value The bytes for modType to set. + * @return This builder for chaining. + */ + public Builder setModTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + modType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object valueCaptureType_ = ""; + /** + * + * + *
+     * One of value capture type: NEW_VALUES, OLD_VALUES, OLD_AND_NEW_VALUES.
+     * 
+ * + * string value_capture_type = 9; + * + * @return The valueCaptureType. + */ + public java.lang.String getValueCaptureType() { + java.lang.Object ref = valueCaptureType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valueCaptureType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * One of value capture type: NEW_VALUES, OLD_VALUES, OLD_AND_NEW_VALUES.
+     * 
+ * + * string value_capture_type = 9; + * + * @return The bytes for valueCaptureType. + */ + public com.google.protobuf.ByteString getValueCaptureTypeBytes() { + java.lang.Object ref = valueCaptureType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + valueCaptureType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * One of value capture type: NEW_VALUES, OLD_VALUES, OLD_AND_NEW_VALUES.
+     * 
+ * + * string value_capture_type = 9; + * + * @param value The valueCaptureType to set. + * @return This builder for chaining. + */ + public Builder setValueCaptureType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueCaptureType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * One of value capture type: NEW_VALUES, OLD_VALUES, OLD_AND_NEW_VALUES.
+     * 
+ * + * string value_capture_type = 9; + * + * @return This builder for chaining. + */ + public Builder clearValueCaptureType() { + valueCaptureType_ = getDefaultInstance().getValueCaptureType(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * One of value capture type: NEW_VALUES, OLD_VALUES, OLD_AND_NEW_VALUES.
+     * 
+ * + * string value_capture_type = 9; + * + * @param value The bytes for valueCaptureType to set. + * @return This builder for chaining. + */ + public Builder setValueCaptureTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueCaptureType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private long recordCount_; + /** + * + * + *
+     * Number of records in transactions.
+     * 
+ * + * int64 record_count = 10; + * + * @return The recordCount. + */ + @java.lang.Override + public long getRecordCount() { + return recordCount_; + } + /** + * + * + *
+     * Number of records in transactions.
+     * 
+ * + * int64 record_count = 10; + * + * @param value The recordCount to set. + * @return This builder for chaining. + */ + public Builder setRecordCount(long value) { + + recordCount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of records in transactions.
+     * 
+ * + * int64 record_count = 10; + * + * @return This builder for chaining. + */ + public Builder clearRecordCount() { + bitField0_ = (bitField0_ & ~0x00000200); + recordCount_ = 0L; + onChanged(); + return this; + } + + private long partitionCount_; + /** + * + * + *
+     * Number of partitions in transactions.
+     * 
+ * + * int64 partition_count = 11; + * + * @return The partitionCount. + */ + @java.lang.Override + public long getPartitionCount() { + return partitionCount_; + } + /** + * + * + *
+     * Number of partitions in transactions.
+     * 
+ * + * int64 partition_count = 11; + * + * @param value The partitionCount to set. + * @return This builder for chaining. + */ + public Builder setPartitionCount(long value) { + + partitionCount_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of partitions in transactions.
+     * 
+ * + * int64 partition_count = 11; + * + * @return This builder for chaining. + */ + public Builder clearPartitionCount() { + bitField0_ = (bitField0_ & ~0x00000400); + partitionCount_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object transactionTag_ = ""; + /** + * + * + *
+     * Transaction tag info.
+     * 
+ * + * string transaction_tag = 12; + * + * @return The transactionTag. + */ + public java.lang.String getTransactionTag() { + java.lang.Object ref = transactionTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Transaction tag info.
+     * 
+ * + * string transaction_tag = 12; + * + * @return The bytes for transactionTag. + */ + public com.google.protobuf.ByteString getTransactionTagBytes() { + java.lang.Object ref = transactionTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transactionTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Transaction tag info.
+     * 
+ * + * string transaction_tag = 12; + * + * @param value The transactionTag to set. + * @return This builder for chaining. + */ + public Builder setTransactionTag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + transactionTag_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Transaction tag info.
+     * 
+ * + * string transaction_tag = 12; + * + * @return This builder for chaining. + */ + public Builder clearTransactionTag() { + transactionTag_ = getDefaultInstance().getTransactionTag(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+     * Transaction tag info.
+     * 
+ * + * string transaction_tag = 12; + * + * @param value The bytes for transactionTag to set. + * @return This builder for chaining. + */ + public Builder setTransactionTagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + transactionTag_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private boolean isSystemTransaction_; + /** + * + * + *
+     * Whether the transaction is a system transactionn.
+     * 
+ * + * bool is_system_transaction = 13; + * + * @return The isSystemTransaction. + */ + @java.lang.Override + public boolean getIsSystemTransaction() { + return isSystemTransaction_; + } + /** + * + * + *
+     * Whether the transaction is a system transactionn.
+     * 
+ * + * bool is_system_transaction = 13; + * + * @param value The isSystemTransaction to set. + * @return This builder for chaining. + */ + public Builder setIsSystemTransaction(boolean value) { + + isSystemTransaction_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the transaction is a system transactionn.
+     * 
+ * + * bool is_system_transaction = 13; + * + * @return This builder for chaining. + */ + public Builder clearIsSystemTransaction() { + bitField0_ = (bitField0_ & ~0x00001000); + isSystemTransaction_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.DataChangeRecord) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.DataChangeRecord) + private static final com.google.spanner.executor.v1.DataChangeRecord DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.DataChangeRecord(); + } + + public static com.google.spanner.executor.v1.DataChangeRecord getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataChangeRecord 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.executor.v1.DataChangeRecord getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DataChangeRecordOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DataChangeRecordOrBuilder.java new file mode 100644 index 00000000000..a90dcd59314 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DataChangeRecordOrBuilder.java @@ -0,0 +1,370 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface DataChangeRecordOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DataChangeRecord) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The timestamp in which the change was committed.
+   * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + * + * @return Whether the commitTime field is set. + */ + boolean hasCommitTime(); + /** + * + * + *
+   * The timestamp in which the change was committed.
+   * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + * + * @return The commitTime. + */ + com.google.protobuf.Timestamp getCommitTime(); + /** + * + * + *
+   * The timestamp in which the change was committed.
+   * 
+ * + * .google.protobuf.Timestamp commit_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder(); + + /** + * + * + *
+   * The sequence number for the record within the transaction.
+   * 
+ * + * string record_sequence = 2; + * + * @return The recordSequence. + */ + java.lang.String getRecordSequence(); + /** + * + * + *
+   * The sequence number for the record within the transaction.
+   * 
+ * + * string record_sequence = 2; + * + * @return The bytes for recordSequence. + */ + com.google.protobuf.ByteString getRecordSequenceBytes(); + + /** + * + * + *
+   * A globally unique string that represents the transaction in which the
+   * change was committed.
+   * 
+ * + * string transaction_id = 3; + * + * @return The transactionId. + */ + java.lang.String getTransactionId(); + /** + * + * + *
+   * A globally unique string that represents the transaction in which the
+   * change was committed.
+   * 
+ * + * string transaction_id = 3; + * + * @return The bytes for transactionId. + */ + com.google.protobuf.ByteString getTransactionIdBytes(); + + /** + * + * + *
+   * Indicates whether this is the last record for a transaction in the current
+   * partition.
+   * 
+ * + * bool is_last_record = 4; + * + * @return The isLastRecord. + */ + boolean getIsLastRecord(); + + /** + * + * + *
+   * Name of the table affected by the change.
+   * 
+ * + * string table = 5; + * + * @return The table. + */ + java.lang.String getTable(); + /** + * + * + *
+   * Name of the table affected by the change.
+   * 
+ * + * string table = 5; + * + * @return The bytes for table. + */ + com.google.protobuf.ByteString getTableBytes(); + + /** + * + * + *
+   * Column types defined in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + */ + java.util.List getColumnTypesList(); + /** + * + * + *
+   * Column types defined in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + */ + com.google.spanner.executor.v1.DataChangeRecord.ColumnType getColumnTypes(int index); + /** + * + * + *
+   * Column types defined in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + */ + int getColumnTypesCount(); + /** + * + * + *
+   * Column types defined in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + */ + java.util.List + getColumnTypesOrBuilderList(); + /** + * + * + *
+   * Column types defined in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.ColumnType column_types = 6; + */ + com.google.spanner.executor.v1.DataChangeRecord.ColumnTypeOrBuilder getColumnTypesOrBuilder( + int index); + + /** + * + * + *
+   * Changes made in the transaction.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + java.util.List getModsList(); + /** + * + * + *
+   * Changes made in the transaction.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + com.google.spanner.executor.v1.DataChangeRecord.Mod getMods(int index); + /** + * + * + *
+   * Changes made in the transaction.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + int getModsCount(); + /** + * + * + *
+   * Changes made in the transaction.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + java.util.List + getModsOrBuilderList(); + /** + * + * + *
+   * Changes made in the transaction.
+   * 
+ * + * repeated .google.spanner.executor.v1.DataChangeRecord.Mod mods = 7; + */ + com.google.spanner.executor.v1.DataChangeRecord.ModOrBuilder getModsOrBuilder(int index); + + /** + * + * + *
+   * Describes the type of change. One of INSERT, UPDATE or DELETE.
+   * 
+ * + * string mod_type = 8; + * + * @return The modType. + */ + java.lang.String getModType(); + /** + * + * + *
+   * Describes the type of change. One of INSERT, UPDATE or DELETE.
+   * 
+ * + * string mod_type = 8; + * + * @return The bytes for modType. + */ + com.google.protobuf.ByteString getModTypeBytes(); + + /** + * + * + *
+   * One of value capture type: NEW_VALUES, OLD_VALUES, OLD_AND_NEW_VALUES.
+   * 
+ * + * string value_capture_type = 9; + * + * @return The valueCaptureType. + */ + java.lang.String getValueCaptureType(); + /** + * + * + *
+   * One of value capture type: NEW_VALUES, OLD_VALUES, OLD_AND_NEW_VALUES.
+   * 
+ * + * string value_capture_type = 9; + * + * @return The bytes for valueCaptureType. + */ + com.google.protobuf.ByteString getValueCaptureTypeBytes(); + + /** + * + * + *
+   * Number of records in transactions.
+   * 
+ * + * int64 record_count = 10; + * + * @return The recordCount. + */ + long getRecordCount(); + + /** + * + * + *
+   * Number of partitions in transactions.
+   * 
+ * + * int64 partition_count = 11; + * + * @return The partitionCount. + */ + long getPartitionCount(); + + /** + * + * + *
+   * Transaction tag info.
+   * 
+ * + * string transaction_tag = 12; + * + * @return The transactionTag. + */ + java.lang.String getTransactionTag(); + /** + * + * + *
+   * Transaction tag info.
+   * 
+ * + * string transaction_tag = 12; + * + * @return The bytes for transactionTag. + */ + com.google.protobuf.ByteString getTransactionTagBytes(); + + /** + * + * + *
+   * Whether the transaction is a system transactionn.
+   * 
+ * + * bool is_system_transaction = 13; + * + * @return The isSystemTransaction. + */ + boolean getIsSystemTransaction(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteCloudBackupAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteCloudBackupAction.java new file mode 100644 index 00000000000..35017e99411 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteCloudBackupAction.java @@ -0,0 +1,989 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that deletes a Cloud Spanner database backup.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DeleteCloudBackupAction} + */ +public final class DeleteCloudBackupAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DeleteCloudBackupAction) + DeleteCloudBackupActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteCloudBackupAction.newBuilder() to construct. + private DeleteCloudBackupAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteCloudBackupAction() { + projectId_ = ""; + instanceId_ = ""; + backupId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteCloudBackupAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DeleteCloudBackupAction.class, + com.google.spanner.executor.v1.DeleteCloudBackupAction.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupId_ = ""; + /** + * + * + *
+   * The id of the backup to delete, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + @java.lang.Override + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + 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(); + backupId_ = s; + return s; + } + } + /** + * + * + *
+   * The id of the backup to delete, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); + } + 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.executor.v1.DeleteCloudBackupAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.DeleteCloudBackupAction other = + (com.google.spanner.executor.v1.DeleteCloudBackupAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getBackupId().equals(other.getBackupId())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.DeleteCloudBackupAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DeleteCloudBackupAction 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.executor.v1.DeleteCloudBackupAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DeleteCloudBackupAction 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.executor.v1.DeleteCloudBackupAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DeleteCloudBackupAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.DeleteCloudBackupAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DeleteCloudBackupAction 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.executor.v1.DeleteCloudBackupAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DeleteCloudBackupAction 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.executor.v1.DeleteCloudBackupAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DeleteCloudBackupAction 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.executor.v1.DeleteCloudBackupAction 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; + } + /** + * + * + *
+   * Action that deletes a Cloud Spanner database backup.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DeleteCloudBackupAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DeleteCloudBackupAction) + com.google.spanner.executor.v1.DeleteCloudBackupActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DeleteCloudBackupAction.class, + com.google.spanner.executor.v1.DeleteCloudBackupAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.DeleteCloudBackupAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + backupId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteCloudBackupAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudBackupAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.DeleteCloudBackupAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudBackupAction build() { + com.google.spanner.executor.v1.DeleteCloudBackupAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudBackupAction buildPartial() { + com.google.spanner.executor.v1.DeleteCloudBackupAction result = + new com.google.spanner.executor.v1.DeleteCloudBackupAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.DeleteCloudBackupAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupId_ = backupId_; + } + } + + @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.executor.v1.DeleteCloudBackupAction) { + return mergeFrom((com.google.spanner.executor.v1.DeleteCloudBackupAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.DeleteCloudBackupAction other) { + if (other == com.google.spanner.executor.v1.DeleteCloudBackupAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getBackupId().isEmpty()) { + backupId_ = other.backupId_; + bitField0_ |= 0x00000004; + onChanged(); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + backupId_ = input.readStringRequireUtf8(); + 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 java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object backupId_ = ""; + /** + * + * + *
+     * The id of the backup to delete, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The id of the backup to delete, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The id of the backup to delete, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @param value The backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the backup to delete, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearBackupId() { + backupId_ = getDefaultInstance().getBackupId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the backup to delete, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @param value The bytes for backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.DeleteCloudBackupAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.DeleteCloudBackupAction) + private static final com.google.spanner.executor.v1.DeleteCloudBackupAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.DeleteCloudBackupAction(); + } + + public static com.google.spanner.executor.v1.DeleteCloudBackupAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCloudBackupAction 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.executor.v1.DeleteCloudBackupAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteCloudBackupActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteCloudBackupActionOrBuilder.java new file mode 100644 index 00000000000..425f0ca134a --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteCloudBackupActionOrBuilder.java @@ -0,0 +1,100 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface DeleteCloudBackupActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DeleteCloudBackupAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * The id of the backup to delete, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + java.lang.String getBackupId(); + /** + * + * + *
+   * The id of the backup to delete, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + com.google.protobuf.ByteString getBackupIdBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteCloudInstanceAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteCloudInstanceAction.java new file mode 100644 index 00000000000..dd686b8f6a3 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteCloudInstanceAction.java @@ -0,0 +1,807 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that deletes a Cloud Spanner instance.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DeleteCloudInstanceAction} + */ +public final class DeleteCloudInstanceAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DeleteCloudInstanceAction) + DeleteCloudInstanceActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteCloudInstanceAction.newBuilder() to construct. + private DeleteCloudInstanceAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteCloudInstanceAction() { + instanceId_ = ""; + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteCloudInstanceAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DeleteCloudInstanceAction.class, + com.google.spanner.executor.v1.DeleteCloudInstanceAction.Builder.class); + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + 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(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + 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.executor.v1.DeleteCloudInstanceAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.DeleteCloudInstanceAction other = + (com.google.spanner.executor.v1.DeleteCloudInstanceAction) obj; + + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getProjectId().equals(other.getProjectId())) 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) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.DeleteCloudInstanceAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DeleteCloudInstanceAction 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.executor.v1.DeleteCloudInstanceAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DeleteCloudInstanceAction 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.executor.v1.DeleteCloudInstanceAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DeleteCloudInstanceAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.DeleteCloudInstanceAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DeleteCloudInstanceAction 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.executor.v1.DeleteCloudInstanceAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DeleteCloudInstanceAction 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.executor.v1.DeleteCloudInstanceAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DeleteCloudInstanceAction 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.executor.v1.DeleteCloudInstanceAction 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; + } + /** + * + * + *
+   * Action that deletes a Cloud Spanner instance.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DeleteCloudInstanceAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DeleteCloudInstanceAction) + com.google.spanner.executor.v1.DeleteCloudInstanceActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DeleteCloudInstanceAction.class, + com.google.spanner.executor.v1.DeleteCloudInstanceAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.DeleteCloudInstanceAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceId_ = ""; + projectId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteCloudInstanceAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudInstanceAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.DeleteCloudInstanceAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudInstanceAction build() { + com.google.spanner.executor.v1.DeleteCloudInstanceAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DeleteCloudInstanceAction buildPartial() { + com.google.spanner.executor.v1.DeleteCloudInstanceAction result = + new com.google.spanner.executor.v1.DeleteCloudInstanceAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.DeleteCloudInstanceAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + } + + @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.executor.v1.DeleteCloudInstanceAction) { + return mergeFrom((com.google.spanner.executor.v1.DeleteCloudInstanceAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.DeleteCloudInstanceAction other) { + if (other == com.google.spanner.executor.v1.DeleteCloudInstanceAction.getDefaultInstance()) + return this; + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + 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: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.DeleteCloudInstanceAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.DeleteCloudInstanceAction) + private static final com.google.spanner.executor.v1.DeleteCloudInstanceAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.DeleteCloudInstanceAction(); + } + + public static com.google.spanner.executor.v1.DeleteCloudInstanceAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCloudInstanceAction 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.executor.v1.DeleteCloudInstanceAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteCloudInstanceActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteCloudInstanceActionOrBuilder.java new file mode 100644 index 00000000000..47efef6e091 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteCloudInstanceActionOrBuilder.java @@ -0,0 +1,75 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface DeleteCloudInstanceActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DeleteCloudInstanceAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteUserInstanceConfigAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteUserInstanceConfigAction.java new file mode 100644 index 00000000000..4797f360e46 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteUserInstanceConfigAction.java @@ -0,0 +1,812 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that deletes a user instance configs.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DeleteUserInstanceConfigAction} + */ +public final class DeleteUserInstanceConfigAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DeleteUserInstanceConfigAction) + DeleteUserInstanceConfigActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteUserInstanceConfigAction.newBuilder() to construct. + private DeleteUserInstanceConfigAction( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteUserInstanceConfigAction() { + userConfigId_ = ""; + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteUserInstanceConfigAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.class, + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.Builder.class); + } + + public static final int USER_CONFIG_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object userConfigId_ = ""; + /** + * + * + *
+   * User instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string user_config_id = 1; + * + * @return The userConfigId. + */ + @java.lang.Override + public java.lang.String getUserConfigId() { + java.lang.Object ref = userConfigId_; + 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(); + userConfigId_ = s; + return s; + } + } + /** + * + * + *
+   * User instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string user_config_id = 1; + * + * @return The bytes for userConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserConfigIdBytes() { + java.lang.Object ref = userConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(userConfigId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userConfigId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + 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(userConfigId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userConfigId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + 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.executor.v1.DeleteUserInstanceConfigAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction other = + (com.google.spanner.executor.v1.DeleteUserInstanceConfigAction) obj; + + if (!getUserConfigId().equals(other.getUserConfigId())) return false; + if (!getProjectId().equals(other.getProjectId())) 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) + USER_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserConfigId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.DeleteUserInstanceConfigAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DeleteUserInstanceConfigAction 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.executor.v1.DeleteUserInstanceConfigAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DeleteUserInstanceConfigAction 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.executor.v1.DeleteUserInstanceConfigAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DeleteUserInstanceConfigAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.DeleteUserInstanceConfigAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DeleteUserInstanceConfigAction 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.executor.v1.DeleteUserInstanceConfigAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DeleteUserInstanceConfigAction 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.executor.v1.DeleteUserInstanceConfigAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DeleteUserInstanceConfigAction 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.executor.v1.DeleteUserInstanceConfigAction 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; + } + /** + * + * + *
+   * Action that deletes a user instance configs.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DeleteUserInstanceConfigAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DeleteUserInstanceConfigAction) + com.google.spanner.executor.v1.DeleteUserInstanceConfigActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.class, + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userConfigId_ = ""; + projectId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DeleteUserInstanceConfigAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DeleteUserInstanceConfigAction + getDefaultInstanceForType() { + return com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.DeleteUserInstanceConfigAction build() { + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DeleteUserInstanceConfigAction buildPartial() { + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction result = + new com.google.spanner.executor.v1.DeleteUserInstanceConfigAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.executor.v1.DeleteUserInstanceConfigAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userConfigId_ = userConfigId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + } + + @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.executor.v1.DeleteUserInstanceConfigAction) { + return mergeFrom((com.google.spanner.executor.v1.DeleteUserInstanceConfigAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.DeleteUserInstanceConfigAction other) { + if (other + == com.google.spanner.executor.v1.DeleteUserInstanceConfigAction.getDefaultInstance()) + return this; + if (!other.getUserConfigId().isEmpty()) { + userConfigId_ = other.userConfigId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + 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: + { + userConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 userConfigId_ = ""; + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @return The userConfigId. + */ + public java.lang.String getUserConfigId() { + java.lang.Object ref = userConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @return The bytes for userConfigId. + */ + public com.google.protobuf.ByteString getUserConfigIdBytes() { + java.lang.Object ref = userConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @param value The userConfigId to set. + * @return This builder for chaining. + */ + public Builder setUserConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userConfigId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearUserConfigId() { + userConfigId_ = getDefaultInstance().getUserConfigId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @param value The bytes for userConfigId to set. + * @return This builder for chaining. + */ + public Builder setUserConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userConfigId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.DeleteUserInstanceConfigAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.DeleteUserInstanceConfigAction) + private static final com.google.spanner.executor.v1.DeleteUserInstanceConfigAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.DeleteUserInstanceConfigAction(); + } + + public static com.google.spanner.executor.v1.DeleteUserInstanceConfigAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteUserInstanceConfigAction 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.executor.v1.DeleteUserInstanceConfigAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteUserInstanceConfigActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteUserInstanceConfigActionOrBuilder.java new file mode 100644 index 00000000000..05af4717e2a --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DeleteUserInstanceConfigActionOrBuilder.java @@ -0,0 +1,75 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface DeleteUserInstanceConfigActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DeleteUserInstanceConfigAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * User instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string user_config_id = 1; + * + * @return The userConfigId. + */ + java.lang.String getUserConfigId(); + /** + * + * + *
+   * User instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string user_config_id = 1; + * + * @return The bytes for userConfigId. + */ + com.google.protobuf.ByteString getUserConfigIdBytes(); + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DmlAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DmlAction.java new file mode 100644 index 00000000000..0da95103de4 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DmlAction.java @@ -0,0 +1,841 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * A single DML statement.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DmlAction} + */ +public final class DmlAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DmlAction) + DmlActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use DmlAction.newBuilder() to construct. + private DmlAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DmlAction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DmlAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DmlAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DmlAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DmlAction.class, + com.google.spanner.executor.v1.DmlAction.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_FIELD_NUMBER = 1; + private com.google.spanner.executor.v1.QueryAction update_; + /** + * + * + *
+   * DML statement.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + * + * @return Whether the update field is set. + */ + @java.lang.Override + public boolean hasUpdate() { + return update_ != null; + } + /** + * + * + *
+   * DML statement.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + * + * @return The update. + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction getUpdate() { + return update_ == null + ? com.google.spanner.executor.v1.QueryAction.getDefaultInstance() + : update_; + } + /** + * + * + *
+   * DML statement.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryActionOrBuilder getUpdateOrBuilder() { + return update_ == null + ? com.google.spanner.executor.v1.QueryAction.getDefaultInstance() + : update_; + } + + public static final int AUTOCOMMIT_IF_SUPPORTED_FIELD_NUMBER = 2; + private boolean autocommitIfSupported_ = false; + /** + * + * + *
+   * Whether to autocommit the transaction after executing the DML statement,
+   * if the Executor supports autocommit.
+   * 
+ * + * optional bool autocommit_if_supported = 2; + * + * @return Whether the autocommitIfSupported field is set. + */ + @java.lang.Override + public boolean hasAutocommitIfSupported() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Whether to autocommit the transaction after executing the DML statement,
+   * if the Executor supports autocommit.
+   * 
+ * + * optional bool autocommit_if_supported = 2; + * + * @return The autocommitIfSupported. + */ + @java.lang.Override + public boolean getAutocommitIfSupported() { + return autocommitIfSupported_; + } + + 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 (update_ != null) { + output.writeMessage(1, getUpdate()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(2, autocommitIfSupported_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (update_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdate()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, autocommitIfSupported_); + } + 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.executor.v1.DmlAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.DmlAction other = (com.google.spanner.executor.v1.DmlAction) obj; + + if (hasUpdate() != other.hasUpdate()) return false; + if (hasUpdate()) { + if (!getUpdate().equals(other.getUpdate())) return false; + } + if (hasAutocommitIfSupported() != other.hasAutocommitIfSupported()) return false; + if (hasAutocommitIfSupported()) { + if (getAutocommitIfSupported() != other.getAutocommitIfSupported()) 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 (hasUpdate()) { + hash = (37 * hash) + UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getUpdate().hashCode(); + } + if (hasAutocommitIfSupported()) { + hash = (37 * hash) + AUTOCOMMIT_IF_SUPPORTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutocommitIfSupported()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.DmlAction parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DmlAction 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.executor.v1.DmlAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DmlAction 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.executor.v1.DmlAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DmlAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.DmlAction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DmlAction 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.executor.v1.DmlAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DmlAction 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.executor.v1.DmlAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DmlAction 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.executor.v1.DmlAction 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 single DML statement.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DmlAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DmlAction) + com.google.spanner.executor.v1.DmlActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DmlAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DmlAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DmlAction.class, + com.google.spanner.executor.v1.DmlAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.DmlAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + update_ = null; + if (updateBuilder_ != null) { + updateBuilder_.dispose(); + updateBuilder_ = null; + } + autocommitIfSupported_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DmlAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DmlAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.DmlAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.DmlAction build() { + com.google.spanner.executor.v1.DmlAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DmlAction buildPartial() { + com.google.spanner.executor.v1.DmlAction result = + new com.google.spanner.executor.v1.DmlAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.DmlAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.update_ = updateBuilder_ == null ? update_ : updateBuilder_.build(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.autocommitIfSupported_ = autocommitIfSupported_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_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.executor.v1.DmlAction) { + return mergeFrom((com.google.spanner.executor.v1.DmlAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.DmlAction other) { + if (other == com.google.spanner.executor.v1.DmlAction.getDefaultInstance()) return this; + if (other.hasUpdate()) { + mergeUpdate(other.getUpdate()); + } + if (other.hasAutocommitIfSupported()) { + setAutocommitIfSupported(other.getAutocommitIfSupported()); + } + 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: + { + input.readMessage(getUpdateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + autocommitIfSupported_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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.spanner.executor.v1.QueryAction update_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder> + updateBuilder_; + /** + * + * + *
+     * DML statement.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + * + * @return Whether the update field is set. + */ + public boolean hasUpdate() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * DML statement.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + * + * @return The update. + */ + public com.google.spanner.executor.v1.QueryAction getUpdate() { + if (updateBuilder_ == null) { + return update_ == null + ? com.google.spanner.executor.v1.QueryAction.getDefaultInstance() + : update_; + } else { + return updateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * DML statement.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + */ + public Builder setUpdate(com.google.spanner.executor.v1.QueryAction value) { + if (updateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + update_ = value; + } else { + updateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * DML statement.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + */ + public Builder setUpdate(com.google.spanner.executor.v1.QueryAction.Builder builderForValue) { + if (updateBuilder_ == null) { + update_ = builderForValue.build(); + } else { + updateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * DML statement.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + */ + public Builder mergeUpdate(com.google.spanner.executor.v1.QueryAction value) { + if (updateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && update_ != null + && update_ != com.google.spanner.executor.v1.QueryAction.getDefaultInstance()) { + getUpdateBuilder().mergeFrom(value); + } else { + update_ = value; + } + } else { + updateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * DML statement.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + */ + public Builder clearUpdate() { + bitField0_ = (bitField0_ & ~0x00000001); + update_ = null; + if (updateBuilder_ != null) { + updateBuilder_.dispose(); + updateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * DML statement.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + */ + public com.google.spanner.executor.v1.QueryAction.Builder getUpdateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * DML statement.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + */ + public com.google.spanner.executor.v1.QueryActionOrBuilder getUpdateOrBuilder() { + if (updateBuilder_ != null) { + return updateBuilder_.getMessageOrBuilder(); + } else { + return update_ == null + ? com.google.spanner.executor.v1.QueryAction.getDefaultInstance() + : update_; + } + } + /** + * + * + *
+     * DML statement.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder> + getUpdateFieldBuilder() { + if (updateBuilder_ == null) { + updateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder>( + getUpdate(), getParentForChildren(), isClean()); + update_ = null; + } + return updateBuilder_; + } + + private boolean autocommitIfSupported_; + /** + * + * + *
+     * Whether to autocommit the transaction after executing the DML statement,
+     * if the Executor supports autocommit.
+     * 
+ * + * optional bool autocommit_if_supported = 2; + * + * @return Whether the autocommitIfSupported field is set. + */ + @java.lang.Override + public boolean hasAutocommitIfSupported() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Whether to autocommit the transaction after executing the DML statement,
+     * if the Executor supports autocommit.
+     * 
+ * + * optional bool autocommit_if_supported = 2; + * + * @return The autocommitIfSupported. + */ + @java.lang.Override + public boolean getAutocommitIfSupported() { + return autocommitIfSupported_; + } + /** + * + * + *
+     * Whether to autocommit the transaction after executing the DML statement,
+     * if the Executor supports autocommit.
+     * 
+ * + * optional bool autocommit_if_supported = 2; + * + * @param value The autocommitIfSupported to set. + * @return This builder for chaining. + */ + public Builder setAutocommitIfSupported(boolean value) { + + autocommitIfSupported_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to autocommit the transaction after executing the DML statement,
+     * if the Executor supports autocommit.
+     * 
+ * + * optional bool autocommit_if_supported = 2; + * + * @return This builder for chaining. + */ + public Builder clearAutocommitIfSupported() { + bitField0_ = (bitField0_ & ~0x00000002); + autocommitIfSupported_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.DmlAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.DmlAction) + private static final com.google.spanner.executor.v1.DmlAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.DmlAction(); + } + + public static com.google.spanner.executor.v1.DmlAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DmlAction 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.executor.v1.DmlAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DmlActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DmlActionOrBuilder.java new file mode 100644 index 00000000000..150769c53b4 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DmlActionOrBuilder.java @@ -0,0 +1,87 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface DmlActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DmlAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * DML statement.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + * + * @return Whether the update field is set. + */ + boolean hasUpdate(); + /** + * + * + *
+   * DML statement.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + * + * @return The update. + */ + com.google.spanner.executor.v1.QueryAction getUpdate(); + /** + * + * + *
+   * DML statement.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction update = 1; + */ + com.google.spanner.executor.v1.QueryActionOrBuilder getUpdateOrBuilder(); + + /** + * + * + *
+   * Whether to autocommit the transaction after executing the DML statement,
+   * if the Executor supports autocommit.
+   * 
+ * + * optional bool autocommit_if_supported = 2; + * + * @return Whether the autocommitIfSupported field is set. + */ + boolean hasAutocommitIfSupported(); + /** + * + * + *
+   * Whether to autocommit the transaction after executing the DML statement,
+   * if the Executor supports autocommit.
+   * 
+ * + * optional bool autocommit_if_supported = 2; + * + * @return The autocommitIfSupported. + */ + boolean getAutocommitIfSupported(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DropCloudDatabaseAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DropCloudDatabaseAction.java new file mode 100644 index 00000000000..c584cae1fdb --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DropCloudDatabaseAction.java @@ -0,0 +1,989 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that drops a Cloud Spanner database.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DropCloudDatabaseAction} + */ +public final class DropCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.DropCloudDatabaseAction) + DropCloudDatabaseActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use DropCloudDatabaseAction.newBuilder() to construct. + private DropCloudDatabaseAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DropCloudDatabaseAction() { + instanceId_ = ""; + projectId_ = ""; + databaseId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DropCloudDatabaseAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DropCloudDatabaseAction.class, + com.google.spanner.executor.v1.DropCloudDatabaseAction.Builder.class); + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseId_ = ""; + /** + * + * + *
+   * Cloud database ID (not full path), e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + @java.lang.Override + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + 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(); + databaseId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud database ID (not full path), e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseId_); + } + 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(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseId_); + } + 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.executor.v1.DropCloudDatabaseAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.DropCloudDatabaseAction other = + (com.google.spanner.executor.v1.DropCloudDatabaseAction) obj; + + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getDatabaseId().equals(other.getDatabaseId())) 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) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.DropCloudDatabaseAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DropCloudDatabaseAction 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.executor.v1.DropCloudDatabaseAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DropCloudDatabaseAction 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.executor.v1.DropCloudDatabaseAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.DropCloudDatabaseAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.DropCloudDatabaseAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DropCloudDatabaseAction 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.executor.v1.DropCloudDatabaseAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DropCloudDatabaseAction 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.executor.v1.DropCloudDatabaseAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.DropCloudDatabaseAction 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.executor.v1.DropCloudDatabaseAction 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; + } + /** + * + * + *
+   * Action that drops a Cloud Spanner database.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.DropCloudDatabaseAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.DropCloudDatabaseAction) + com.google.spanner.executor.v1.DropCloudDatabaseActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.DropCloudDatabaseAction.class, + com.google.spanner.executor.v1.DropCloudDatabaseAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.DropCloudDatabaseAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceId_ = ""; + projectId_ = ""; + databaseId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_DropCloudDatabaseAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DropCloudDatabaseAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.DropCloudDatabaseAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.DropCloudDatabaseAction build() { + com.google.spanner.executor.v1.DropCloudDatabaseAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.DropCloudDatabaseAction buildPartial() { + com.google.spanner.executor.v1.DropCloudDatabaseAction result = + new com.google.spanner.executor.v1.DropCloudDatabaseAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.DropCloudDatabaseAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.databaseId_ = databaseId_; + } + } + + @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.executor.v1.DropCloudDatabaseAction) { + return mergeFrom((com.google.spanner.executor.v1.DropCloudDatabaseAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.DropCloudDatabaseAction other) { + if (other == com.google.spanner.executor.v1.DropCloudDatabaseAction.getDefaultInstance()) + return this; + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDatabaseId().isEmpty()) { + databaseId_ = other.databaseId_; + bitField0_ |= 0x00000004; + onChanged(); + } + 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: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + databaseId_ = input.readStringRequireUtf8(); + 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 java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object databaseId_ = ""; + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + databaseId_ = getDefaultInstance().getDatabaseId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @param value The bytes for databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.DropCloudDatabaseAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.DropCloudDatabaseAction) + private static final com.google.spanner.executor.v1.DropCloudDatabaseAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.DropCloudDatabaseAction(); + } + + public static com.google.spanner.executor.v1.DropCloudDatabaseAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DropCloudDatabaseAction 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.executor.v1.DropCloudDatabaseAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DropCloudDatabaseActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DropCloudDatabaseActionOrBuilder.java new file mode 100644 index 00000000000..76870d4764f --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/DropCloudDatabaseActionOrBuilder.java @@ -0,0 +1,100 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface DropCloudDatabaseActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.DropCloudDatabaseAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud database ID (not full path), e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + java.lang.String getDatabaseId(); + /** + * + * + *
+   * Cloud database ID (not full path), e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + com.google.protobuf.ByteString getDatabaseIdBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ExecuteChangeStreamQuery.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ExecuteChangeStreamQuery.java new file mode 100644 index 00000000000..c54424ced16 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ExecuteChangeStreamQuery.java @@ -0,0 +1,2177 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Execute a change stream TVF query.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ExecuteChangeStreamQuery} + */ +public final class ExecuteChangeStreamQuery extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ExecuteChangeStreamQuery) + ExecuteChangeStreamQueryOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecuteChangeStreamQuery.newBuilder() to construct. + private ExecuteChangeStreamQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecuteChangeStreamQuery() { + name_ = ""; + partitionToken_ = ""; + readOptions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + cloudDatabaseRole_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecuteChangeStreamQuery(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ExecuteChangeStreamQuery.class, + com.google.spanner.executor.v1.ExecuteChangeStreamQuery.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Name for this change stream.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name for this change stream.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Specifies that records with commit_timestamp greater than or equal to
+   * start_time should be returned.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Specifies that records with commit_timestamp greater than or equal to
+   * start_time should be returned.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Specifies that records with commit_timestamp greater than or equal to
+   * start_time should be returned.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Specifies that records with commit_timestamp less than or equal to
+   * end_time should be returned.
+   * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Specifies that records with commit_timestamp less than or equal to
+   * end_time should be returned.
+   * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Specifies that records with commit_timestamp less than or equal to
+   * end_time should be returned.
+   * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int PARTITION_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object partitionToken_ = ""; + /** + * + * + *
+   * Specifies which change stream partition to query, based on the content of
+   * child partitions records.
+   * 
+ * + * optional string partition_token = 4; + * + * @return Whether the partitionToken field is set. + */ + @java.lang.Override + public boolean hasPartitionToken() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Specifies which change stream partition to query, based on the content of
+   * child partitions records.
+   * 
+ * + * optional string partition_token = 4; + * + * @return The partitionToken. + */ + @java.lang.Override + public java.lang.String getPartitionToken() { + java.lang.Object ref = partitionToken_; + 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(); + partitionToken_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies which change stream partition to query, based on the content of
+   * child partitions records.
+   * 
+ * + * optional string partition_token = 4; + * + * @return The bytes for partitionToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPartitionTokenBytes() { + java.lang.Object ref = partitionToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + partitionToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_OPTIONS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList readOptions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Read options for this change stream query.
+   * 
+ * + * repeated string read_options = 5; + * + * @return A list containing the readOptions. + */ + public com.google.protobuf.ProtocolStringList getReadOptionsList() { + return readOptions_; + } + /** + * + * + *
+   * Read options for this change stream query.
+   * 
+ * + * repeated string read_options = 5; + * + * @return The count of readOptions. + */ + public int getReadOptionsCount() { + return readOptions_.size(); + } + /** + * + * + *
+   * Read options for this change stream query.
+   * 
+ * + * repeated string read_options = 5; + * + * @param index The index of the element to return. + * @return The readOptions at the given index. + */ + public java.lang.String getReadOptions(int index) { + return readOptions_.get(index); + } + /** + * + * + *
+   * Read options for this change stream query.
+   * 
+ * + * repeated string read_options = 5; + * + * @param index The index of the value to return. + * @return The bytes of the readOptions at the given index. + */ + public com.google.protobuf.ByteString getReadOptionsBytes(int index) { + return readOptions_.getByteString(index); + } + + public static final int HEARTBEAT_MILLISECONDS_FIELD_NUMBER = 6; + private int heartbeatMilliseconds_ = 0; + /** + * + * + *
+   * Determines how frequently a heartbeat ChangeRecord will be returned in case
+   * there are no transactions committed in this partition, in milliseconds.
+   * 
+ * + * optional int32 heartbeat_milliseconds = 6; + * + * @return Whether the heartbeatMilliseconds field is set. + */ + @java.lang.Override + public boolean hasHeartbeatMilliseconds() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Determines how frequently a heartbeat ChangeRecord will be returned in case
+   * there are no transactions committed in this partition, in milliseconds.
+   * 
+ * + * optional int32 heartbeat_milliseconds = 6; + * + * @return The heartbeatMilliseconds. + */ + @java.lang.Override + public int getHeartbeatMilliseconds() { + return heartbeatMilliseconds_; + } + + public static final int DEADLINE_SECONDS_FIELD_NUMBER = 7; + private long deadlineSeconds_ = 0L; + /** + * + * + *
+   * Deadline for this change stream query, in seconds.
+   * 
+ * + * optional int64 deadline_seconds = 7; + * + * @return Whether the deadlineSeconds field is set. + */ + @java.lang.Override + public boolean hasDeadlineSeconds() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Deadline for this change stream query, in seconds.
+   * 
+ * + * optional int64 deadline_seconds = 7; + * + * @return The deadlineSeconds. + */ + @java.lang.Override + public long getDeadlineSeconds() { + return deadlineSeconds_; + } + + public static final int CLOUD_DATABASE_ROLE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object cloudDatabaseRole_ = ""; + /** + * + * + *
+   * Database role to assume while performing this action. This should only be
+   * set for cloud requests. Setting the database role will enforce additional
+   * role-based access checks on this action.
+   * 
+ * + * optional string cloud_database_role = 8; + * + * @return Whether the cloudDatabaseRole field is set. + */ + @java.lang.Override + public boolean hasCloudDatabaseRole() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Database role to assume while performing this action. This should only be
+   * set for cloud requests. Setting the database role will enforce additional
+   * role-based access checks on this action.
+   * 
+ * + * optional string cloud_database_role = 8; + * + * @return The cloudDatabaseRole. + */ + @java.lang.Override + public java.lang.String getCloudDatabaseRole() { + java.lang.Object ref = cloudDatabaseRole_; + 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(); + cloudDatabaseRole_ = s; + return s; + } + } + /** + * + * + *
+   * Database role to assume while performing this action. This should only be
+   * set for cloud requests. Setting the database role will enforce additional
+   * role-based access checks on this action.
+   * 
+ * + * optional string cloud_database_role = 8; + * + * @return The bytes for cloudDatabaseRole. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudDatabaseRoleBytes() { + java.lang.Object ref = cloudDatabaseRole_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudDatabaseRole_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (startTime_ != null) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getEndTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, partitionToken_); + } + for (int i = 0; i < readOptions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, readOptions_.getRaw(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt32(6, heartbeatMilliseconds_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeInt64(7, deadlineSeconds_); + } + if (((bitField0_ & 0x00000010) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, cloudDatabaseRole_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, partitionToken_); + } + { + int dataSize = 0; + for (int i = 0; i < readOptions_.size(); i++) { + dataSize += computeStringSizeNoTag(readOptions_.getRaw(i)); + } + size += dataSize; + size += 1 * getReadOptionsList().size(); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, heartbeatMilliseconds_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, deadlineSeconds_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, cloudDatabaseRole_); + } + 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.executor.v1.ExecuteChangeStreamQuery)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ExecuteChangeStreamQuery other = + (com.google.spanner.executor.v1.ExecuteChangeStreamQuery) obj; + + if (!getName().equals(other.getName())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasPartitionToken() != other.hasPartitionToken()) return false; + if (hasPartitionToken()) { + if (!getPartitionToken().equals(other.getPartitionToken())) return false; + } + if (!getReadOptionsList().equals(other.getReadOptionsList())) return false; + if (hasHeartbeatMilliseconds() != other.hasHeartbeatMilliseconds()) return false; + if (hasHeartbeatMilliseconds()) { + if (getHeartbeatMilliseconds() != other.getHeartbeatMilliseconds()) return false; + } + if (hasDeadlineSeconds() != other.hasDeadlineSeconds()) return false; + if (hasDeadlineSeconds()) { + if (getDeadlineSeconds() != other.getDeadlineSeconds()) return false; + } + if (hasCloudDatabaseRole() != other.hasCloudDatabaseRole()) return false; + if (hasCloudDatabaseRole()) { + if (!getCloudDatabaseRole().equals(other.getCloudDatabaseRole())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasPartitionToken()) { + hash = (37 * hash) + PARTITION_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPartitionToken().hashCode(); + } + if (getReadOptionsCount() > 0) { + hash = (37 * hash) + READ_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getReadOptionsList().hashCode(); + } + if (hasHeartbeatMilliseconds()) { + hash = (37 * hash) + HEARTBEAT_MILLISECONDS_FIELD_NUMBER; + hash = (53 * hash) + getHeartbeatMilliseconds(); + } + if (hasDeadlineSeconds()) { + hash = (37 * hash) + DEADLINE_SECONDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDeadlineSeconds()); + } + if (hasCloudDatabaseRole()) { + hash = (37 * hash) + CLOUD_DATABASE_ROLE_FIELD_NUMBER; + hash = (53 * hash) + getCloudDatabaseRole().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ExecuteChangeStreamQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ExecuteChangeStreamQuery 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.executor.v1.ExecuteChangeStreamQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ExecuteChangeStreamQuery 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.executor.v1.ExecuteChangeStreamQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ExecuteChangeStreamQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ExecuteChangeStreamQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ExecuteChangeStreamQuery 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.executor.v1.ExecuteChangeStreamQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ExecuteChangeStreamQuery 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.executor.v1.ExecuteChangeStreamQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ExecuteChangeStreamQuery 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.executor.v1.ExecuteChangeStreamQuery 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; + } + /** + * + * + *
+   * Execute a change stream TVF query.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ExecuteChangeStreamQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ExecuteChangeStreamQuery) + com.google.spanner.executor.v1.ExecuteChangeStreamQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ExecuteChangeStreamQuery.class, + com.google.spanner.executor.v1.ExecuteChangeStreamQuery.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ExecuteChangeStreamQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + partitionToken_ = ""; + readOptions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + heartbeatMilliseconds_ = 0; + deadlineSeconds_ = 0L; + cloudDatabaseRole_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ExecuteChangeStreamQuery_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ExecuteChangeStreamQuery getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ExecuteChangeStreamQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ExecuteChangeStreamQuery build() { + com.google.spanner.executor.v1.ExecuteChangeStreamQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ExecuteChangeStreamQuery buildPartial() { + com.google.spanner.executor.v1.ExecuteChangeStreamQuery result = + new com.google.spanner.executor.v1.ExecuteChangeStreamQuery(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.ExecuteChangeStreamQuery result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.partitionToken_ = partitionToken_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + readOptions_.makeImmutable(); + result.readOptions_ = readOptions_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.heartbeatMilliseconds_ = heartbeatMilliseconds_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.deadlineSeconds_ = deadlineSeconds_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.cloudDatabaseRole_ = cloudDatabaseRole_; + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_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.executor.v1.ExecuteChangeStreamQuery) { + return mergeFrom((com.google.spanner.executor.v1.ExecuteChangeStreamQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ExecuteChangeStreamQuery other) { + if (other == com.google.spanner.executor.v1.ExecuteChangeStreamQuery.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasPartitionToken()) { + partitionToken_ = other.partitionToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.readOptions_.isEmpty()) { + if (readOptions_.isEmpty()) { + readOptions_ = other.readOptions_; + bitField0_ |= 0x00000010; + } else { + ensureReadOptionsIsMutable(); + readOptions_.addAll(other.readOptions_); + } + onChanged(); + } + if (other.hasHeartbeatMilliseconds()) { + setHeartbeatMilliseconds(other.getHeartbeatMilliseconds()); + } + if (other.hasDeadlineSeconds()) { + setDeadlineSeconds(other.getDeadlineSeconds()); + } + if (other.hasCloudDatabaseRole()) { + cloudDatabaseRole_ = other.cloudDatabaseRole_; + bitField0_ |= 0x00000080; + onChanged(); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + partitionToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReadOptionsIsMutable(); + readOptions_.add(s); + break; + } // case 42 + case 48: + { + heartbeatMilliseconds_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + deadlineSeconds_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + cloudDatabaseRole_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + 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 name_ = ""; + /** + * + * + *
+     * Name for this change stream.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name for this change stream.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name for this change stream.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name for this change stream.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name for this change stream.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Specifies that records with commit_timestamp greater than or equal to
+     * start_time should be returned.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Specifies that records with commit_timestamp greater than or equal to
+     * start_time should be returned.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Specifies that records with commit_timestamp greater than or equal to
+     * start_time should be returned.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies that records with commit_timestamp greater than or equal to
+     * start_time should be returned.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies that records with commit_timestamp greater than or equal to
+     * start_time should be returned.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies that records with commit_timestamp greater than or equal to
+     * start_time should be returned.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies that records with commit_timestamp greater than or equal to
+     * start_time should be returned.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specifies that records with commit_timestamp greater than or equal to
+     * start_time should be returned.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Specifies that records with commit_timestamp greater than or equal to
+     * start_time should be returned.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Specifies that records with commit_timestamp less than or equal to
+     * end_time should be returned.
+     * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Specifies that records with commit_timestamp less than or equal to
+     * end_time should be returned.
+     * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Specifies that records with commit_timestamp less than or equal to
+     * end_time should be returned.
+     * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies that records with commit_timestamp less than or equal to
+     * end_time should be returned.
+     * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies that records with commit_timestamp less than or equal to
+     * end_time should be returned.
+     * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies that records with commit_timestamp less than or equal to
+     * end_time should be returned.
+     * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies that records with commit_timestamp less than or equal to
+     * end_time should be returned.
+     * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specifies that records with commit_timestamp less than or equal to
+     * end_time should be returned.
+     * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Specifies that records with commit_timestamp less than or equal to
+     * end_time should be returned.
+     * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object partitionToken_ = ""; + /** + * + * + *
+     * Specifies which change stream partition to query, based on the content of
+     * child partitions records.
+     * 
+ * + * optional string partition_token = 4; + * + * @return Whether the partitionToken field is set. + */ + public boolean hasPartitionToken() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Specifies which change stream partition to query, based on the content of
+     * child partitions records.
+     * 
+ * + * optional string partition_token = 4; + * + * @return The partitionToken. + */ + public java.lang.String getPartitionToken() { + java.lang.Object ref = partitionToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + partitionToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies which change stream partition to query, based on the content of
+     * child partitions records.
+     * 
+ * + * optional string partition_token = 4; + * + * @return The bytes for partitionToken. + */ + public com.google.protobuf.ByteString getPartitionTokenBytes() { + java.lang.Object ref = partitionToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + partitionToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies which change stream partition to query, based on the content of
+     * child partitions records.
+     * 
+ * + * optional string partition_token = 4; + * + * @param value The partitionToken to set. + * @return This builder for chaining. + */ + public Builder setPartitionToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + partitionToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies which change stream partition to query, based on the content of
+     * child partitions records.
+     * 
+ * + * optional string partition_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPartitionToken() { + partitionToken_ = getDefaultInstance().getPartitionToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies which change stream partition to query, based on the content of
+     * child partitions records.
+     * 
+ * + * optional string partition_token = 4; + * + * @param value The bytes for partitionToken to set. + * @return This builder for chaining. + */ + public Builder setPartitionTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + partitionToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList readOptions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReadOptionsIsMutable() { + if (!readOptions_.isModifiable()) { + readOptions_ = new com.google.protobuf.LazyStringArrayList(readOptions_); + } + bitField0_ |= 0x00000010; + } + /** + * + * + *
+     * Read options for this change stream query.
+     * 
+ * + * repeated string read_options = 5; + * + * @return A list containing the readOptions. + */ + public com.google.protobuf.ProtocolStringList getReadOptionsList() { + readOptions_.makeImmutable(); + return readOptions_; + } + /** + * + * + *
+     * Read options for this change stream query.
+     * 
+ * + * repeated string read_options = 5; + * + * @return The count of readOptions. + */ + public int getReadOptionsCount() { + return readOptions_.size(); + } + /** + * + * + *
+     * Read options for this change stream query.
+     * 
+ * + * repeated string read_options = 5; + * + * @param index The index of the element to return. + * @return The readOptions at the given index. + */ + public java.lang.String getReadOptions(int index) { + return readOptions_.get(index); + } + /** + * + * + *
+     * Read options for this change stream query.
+     * 
+ * + * repeated string read_options = 5; + * + * @param index The index of the value to return. + * @return The bytes of the readOptions at the given index. + */ + public com.google.protobuf.ByteString getReadOptionsBytes(int index) { + return readOptions_.getByteString(index); + } + /** + * + * + *
+     * Read options for this change stream query.
+     * 
+ * + * repeated string read_options = 5; + * + * @param index The index to set the value at. + * @param value The readOptions to set. + * @return This builder for chaining. + */ + public Builder setReadOptions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReadOptionsIsMutable(); + readOptions_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Read options for this change stream query.
+     * 
+ * + * repeated string read_options = 5; + * + * @param value The readOptions to add. + * @return This builder for chaining. + */ + public Builder addReadOptions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReadOptionsIsMutable(); + readOptions_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Read options for this change stream query.
+     * 
+ * + * repeated string read_options = 5; + * + * @param values The readOptions to add. + * @return This builder for chaining. + */ + public Builder addAllReadOptions(java.lang.Iterable values) { + ensureReadOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, readOptions_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Read options for this change stream query.
+     * 
+ * + * repeated string read_options = 5; + * + * @return This builder for chaining. + */ + public Builder clearReadOptions() { + readOptions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Read options for this change stream query.
+     * 
+ * + * repeated string read_options = 5; + * + * @param value The bytes of the readOptions to add. + * @return This builder for chaining. + */ + public Builder addReadOptionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReadOptionsIsMutable(); + readOptions_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int heartbeatMilliseconds_; + /** + * + * + *
+     * Determines how frequently a heartbeat ChangeRecord will be returned in case
+     * there are no transactions committed in this partition, in milliseconds.
+     * 
+ * + * optional int32 heartbeat_milliseconds = 6; + * + * @return Whether the heartbeatMilliseconds field is set. + */ + @java.lang.Override + public boolean hasHeartbeatMilliseconds() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Determines how frequently a heartbeat ChangeRecord will be returned in case
+     * there are no transactions committed in this partition, in milliseconds.
+     * 
+ * + * optional int32 heartbeat_milliseconds = 6; + * + * @return The heartbeatMilliseconds. + */ + @java.lang.Override + public int getHeartbeatMilliseconds() { + return heartbeatMilliseconds_; + } + /** + * + * + *
+     * Determines how frequently a heartbeat ChangeRecord will be returned in case
+     * there are no transactions committed in this partition, in milliseconds.
+     * 
+ * + * optional int32 heartbeat_milliseconds = 6; + * + * @param value The heartbeatMilliseconds to set. + * @return This builder for chaining. + */ + public Builder setHeartbeatMilliseconds(int value) { + + heartbeatMilliseconds_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Determines how frequently a heartbeat ChangeRecord will be returned in case
+     * there are no transactions committed in this partition, in milliseconds.
+     * 
+ * + * optional int32 heartbeat_milliseconds = 6; + * + * @return This builder for chaining. + */ + public Builder clearHeartbeatMilliseconds() { + bitField0_ = (bitField0_ & ~0x00000020); + heartbeatMilliseconds_ = 0; + onChanged(); + return this; + } + + private long deadlineSeconds_; + /** + * + * + *
+     * Deadline for this change stream query, in seconds.
+     * 
+ * + * optional int64 deadline_seconds = 7; + * + * @return Whether the deadlineSeconds field is set. + */ + @java.lang.Override + public boolean hasDeadlineSeconds() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Deadline for this change stream query, in seconds.
+     * 
+ * + * optional int64 deadline_seconds = 7; + * + * @return The deadlineSeconds. + */ + @java.lang.Override + public long getDeadlineSeconds() { + return deadlineSeconds_; + } + /** + * + * + *
+     * Deadline for this change stream query, in seconds.
+     * 
+ * + * optional int64 deadline_seconds = 7; + * + * @param value The deadlineSeconds to set. + * @return This builder for chaining. + */ + public Builder setDeadlineSeconds(long value) { + + deadlineSeconds_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Deadline for this change stream query, in seconds.
+     * 
+ * + * optional int64 deadline_seconds = 7; + * + * @return This builder for chaining. + */ + public Builder clearDeadlineSeconds() { + bitField0_ = (bitField0_ & ~0x00000040); + deadlineSeconds_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object cloudDatabaseRole_ = ""; + /** + * + * + *
+     * Database role to assume while performing this action. This should only be
+     * set for cloud requests. Setting the database role will enforce additional
+     * role-based access checks on this action.
+     * 
+ * + * optional string cloud_database_role = 8; + * + * @return Whether the cloudDatabaseRole field is set. + */ + public boolean hasCloudDatabaseRole() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Database role to assume while performing this action. This should only be
+     * set for cloud requests. Setting the database role will enforce additional
+     * role-based access checks on this action.
+     * 
+ * + * optional string cloud_database_role = 8; + * + * @return The cloudDatabaseRole. + */ + public java.lang.String getCloudDatabaseRole() { + java.lang.Object ref = cloudDatabaseRole_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudDatabaseRole_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Database role to assume while performing this action. This should only be
+     * set for cloud requests. Setting the database role will enforce additional
+     * role-based access checks on this action.
+     * 
+ * + * optional string cloud_database_role = 8; + * + * @return The bytes for cloudDatabaseRole. + */ + public com.google.protobuf.ByteString getCloudDatabaseRoleBytes() { + java.lang.Object ref = cloudDatabaseRole_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudDatabaseRole_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Database role to assume while performing this action. This should only be
+     * set for cloud requests. Setting the database role will enforce additional
+     * role-based access checks on this action.
+     * 
+ * + * optional string cloud_database_role = 8; + * + * @param value The cloudDatabaseRole to set. + * @return This builder for chaining. + */ + public Builder setCloudDatabaseRole(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cloudDatabaseRole_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Database role to assume while performing this action. This should only be
+     * set for cloud requests. Setting the database role will enforce additional
+     * role-based access checks on this action.
+     * 
+ * + * optional string cloud_database_role = 8; + * + * @return This builder for chaining. + */ + public Builder clearCloudDatabaseRole() { + cloudDatabaseRole_ = getDefaultInstance().getCloudDatabaseRole(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Database role to assume while performing this action. This should only be
+     * set for cloud requests. Setting the database role will enforce additional
+     * role-based access checks on this action.
+     * 
+ * + * optional string cloud_database_role = 8; + * + * @param value The bytes for cloudDatabaseRole to set. + * @return This builder for chaining. + */ + public Builder setCloudDatabaseRoleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cloudDatabaseRole_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.ExecuteChangeStreamQuery) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ExecuteChangeStreamQuery) + private static final com.google.spanner.executor.v1.ExecuteChangeStreamQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ExecuteChangeStreamQuery(); + } + + public static com.google.spanner.executor.v1.ExecuteChangeStreamQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecuteChangeStreamQuery 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.executor.v1.ExecuteChangeStreamQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ExecuteChangeStreamQueryOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ExecuteChangeStreamQueryOrBuilder.java new file mode 100644 index 00000000000..6c56630f2d3 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ExecuteChangeStreamQueryOrBuilder.java @@ -0,0 +1,312 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ExecuteChangeStreamQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ExecuteChangeStreamQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name for this change stream.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name for this change stream.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Specifies that records with commit_timestamp greater than or equal to
+   * start_time should be returned.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Specifies that records with commit_timestamp greater than or equal to
+   * start_time should be returned.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Specifies that records with commit_timestamp greater than or equal to
+   * start_time should be returned.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Specifies that records with commit_timestamp less than or equal to
+   * end_time should be returned.
+   * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Specifies that records with commit_timestamp less than or equal to
+   * end_time should be returned.
+   * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Specifies that records with commit_timestamp less than or equal to
+   * end_time should be returned.
+   * 
+ * + * optional .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Specifies which change stream partition to query, based on the content of
+   * child partitions records.
+   * 
+ * + * optional string partition_token = 4; + * + * @return Whether the partitionToken field is set. + */ + boolean hasPartitionToken(); + /** + * + * + *
+   * Specifies which change stream partition to query, based on the content of
+   * child partitions records.
+   * 
+ * + * optional string partition_token = 4; + * + * @return The partitionToken. + */ + java.lang.String getPartitionToken(); + /** + * + * + *
+   * Specifies which change stream partition to query, based on the content of
+   * child partitions records.
+   * 
+ * + * optional string partition_token = 4; + * + * @return The bytes for partitionToken. + */ + com.google.protobuf.ByteString getPartitionTokenBytes(); + + /** + * + * + *
+   * Read options for this change stream query.
+   * 
+ * + * repeated string read_options = 5; + * + * @return A list containing the readOptions. + */ + java.util.List getReadOptionsList(); + /** + * + * + *
+   * Read options for this change stream query.
+   * 
+ * + * repeated string read_options = 5; + * + * @return The count of readOptions. + */ + int getReadOptionsCount(); + /** + * + * + *
+   * Read options for this change stream query.
+   * 
+ * + * repeated string read_options = 5; + * + * @param index The index of the element to return. + * @return The readOptions at the given index. + */ + java.lang.String getReadOptions(int index); + /** + * + * + *
+   * Read options for this change stream query.
+   * 
+ * + * repeated string read_options = 5; + * + * @param index The index of the value to return. + * @return The bytes of the readOptions at the given index. + */ + com.google.protobuf.ByteString getReadOptionsBytes(int index); + + /** + * + * + *
+   * Determines how frequently a heartbeat ChangeRecord will be returned in case
+   * there are no transactions committed in this partition, in milliseconds.
+   * 
+ * + * optional int32 heartbeat_milliseconds = 6; + * + * @return Whether the heartbeatMilliseconds field is set. + */ + boolean hasHeartbeatMilliseconds(); + /** + * + * + *
+   * Determines how frequently a heartbeat ChangeRecord will be returned in case
+   * there are no transactions committed in this partition, in milliseconds.
+   * 
+ * + * optional int32 heartbeat_milliseconds = 6; + * + * @return The heartbeatMilliseconds. + */ + int getHeartbeatMilliseconds(); + + /** + * + * + *
+   * Deadline for this change stream query, in seconds.
+   * 
+ * + * optional int64 deadline_seconds = 7; + * + * @return Whether the deadlineSeconds field is set. + */ + boolean hasDeadlineSeconds(); + /** + * + * + *
+   * Deadline for this change stream query, in seconds.
+   * 
+ * + * optional int64 deadline_seconds = 7; + * + * @return The deadlineSeconds. + */ + long getDeadlineSeconds(); + + /** + * + * + *
+   * Database role to assume while performing this action. This should only be
+   * set for cloud requests. Setting the database role will enforce additional
+   * role-based access checks on this action.
+   * 
+ * + * optional string cloud_database_role = 8; + * + * @return Whether the cloudDatabaseRole field is set. + */ + boolean hasCloudDatabaseRole(); + /** + * + * + *
+   * Database role to assume while performing this action. This should only be
+   * set for cloud requests. Setting the database role will enforce additional
+   * role-based access checks on this action.
+   * 
+ * + * optional string cloud_database_role = 8; + * + * @return The cloudDatabaseRole. + */ + java.lang.String getCloudDatabaseRole(); + /** + * + * + *
+   * Database role to assume while performing this action. This should only be
+   * set for cloud requests. Setting the database role will enforce additional
+   * role-based access checks on this action.
+   * 
+ * + * optional string cloud_database_role = 8; + * + * @return The bytes for cloudDatabaseRole. + */ + com.google.protobuf.ByteString getCloudDatabaseRoleBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ExecutePartitionAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ExecutePartitionAction.java new file mode 100644 index 00000000000..0a809a3f468 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ExecutePartitionAction.java @@ -0,0 +1,711 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Performs a read or query for the given partitions. This action must be
+ * executed in the context of the same transaction that was used to generate
+ * given partitions.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ExecutePartitionAction} + */ +public final class ExecutePartitionAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ExecutePartitionAction) + ExecutePartitionActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecutePartitionAction.newBuilder() to construct. + private ExecutePartitionAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecutePartitionAction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecutePartitionAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ExecutePartitionAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ExecutePartitionAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ExecutePartitionAction.class, + com.google.spanner.executor.v1.ExecutePartitionAction.Builder.class); + } + + public static final int PARTITION_FIELD_NUMBER = 1; + private com.google.spanner.executor.v1.BatchPartition partition_; + /** + * + * + *
+   * Batch partition to execute on.
+   * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + * + * @return Whether the partition field is set. + */ + @java.lang.Override + public boolean hasPartition() { + return partition_ != null; + } + /** + * + * + *
+   * Batch partition to execute on.
+   * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + * + * @return The partition. + */ + @java.lang.Override + public com.google.spanner.executor.v1.BatchPartition getPartition() { + return partition_ == null + ? com.google.spanner.executor.v1.BatchPartition.getDefaultInstance() + : partition_; + } + /** + * + * + *
+   * Batch partition to execute on.
+   * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.BatchPartitionOrBuilder getPartitionOrBuilder() { + return partition_ == null + ? com.google.spanner.executor.v1.BatchPartition.getDefaultInstance() + : partition_; + } + + 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 (partition_ != null) { + output.writeMessage(1, getPartition()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (partition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPartition()); + } + 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.executor.v1.ExecutePartitionAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ExecutePartitionAction other = + (com.google.spanner.executor.v1.ExecutePartitionAction) obj; + + if (hasPartition() != other.hasPartition()) return false; + if (hasPartition()) { + if (!getPartition().equals(other.getPartition())) 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 (hasPartition()) { + hash = (37 * hash) + PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getPartition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ExecutePartitionAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ExecutePartitionAction 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.executor.v1.ExecutePartitionAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ExecutePartitionAction 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.executor.v1.ExecutePartitionAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ExecutePartitionAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ExecutePartitionAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ExecutePartitionAction 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.executor.v1.ExecutePartitionAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ExecutePartitionAction 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.executor.v1.ExecutePartitionAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ExecutePartitionAction 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.executor.v1.ExecutePartitionAction 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; + } + /** + * + * + *
+   * Performs a read or query for the given partitions. This action must be
+   * executed in the context of the same transaction that was used to generate
+   * given partitions.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ExecutePartitionAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ExecutePartitionAction) + com.google.spanner.executor.v1.ExecutePartitionActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ExecutePartitionAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ExecutePartitionAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ExecutePartitionAction.class, + com.google.spanner.executor.v1.ExecutePartitionAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ExecutePartitionAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + partition_ = null; + if (partitionBuilder_ != null) { + partitionBuilder_.dispose(); + partitionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ExecutePartitionAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ExecutePartitionAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ExecutePartitionAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ExecutePartitionAction build() { + com.google.spanner.executor.v1.ExecutePartitionAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ExecutePartitionAction buildPartial() { + com.google.spanner.executor.v1.ExecutePartitionAction result = + new com.google.spanner.executor.v1.ExecutePartitionAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.ExecutePartitionAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.partition_ = partitionBuilder_ == null ? partition_ : partitionBuilder_.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.executor.v1.ExecutePartitionAction) { + return mergeFrom((com.google.spanner.executor.v1.ExecutePartitionAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ExecutePartitionAction other) { + if (other == com.google.spanner.executor.v1.ExecutePartitionAction.getDefaultInstance()) + return this; + if (other.hasPartition()) { + mergePartition(other.getPartition()); + } + 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: + { + input.readMessage(getPartitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + 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 com.google.spanner.executor.v1.BatchPartition partition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.BatchPartition, + com.google.spanner.executor.v1.BatchPartition.Builder, + com.google.spanner.executor.v1.BatchPartitionOrBuilder> + partitionBuilder_; + /** + * + * + *
+     * Batch partition to execute on.
+     * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + * + * @return Whether the partition field is set. + */ + public boolean hasPartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Batch partition to execute on.
+     * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + * + * @return The partition. + */ + public com.google.spanner.executor.v1.BatchPartition getPartition() { + if (partitionBuilder_ == null) { + return partition_ == null + ? com.google.spanner.executor.v1.BatchPartition.getDefaultInstance() + : partition_; + } else { + return partitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Batch partition to execute on.
+     * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + */ + public Builder setPartition(com.google.spanner.executor.v1.BatchPartition value) { + if (partitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partition_ = value; + } else { + partitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Batch partition to execute on.
+     * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + */ + public Builder setPartition( + com.google.spanner.executor.v1.BatchPartition.Builder builderForValue) { + if (partitionBuilder_ == null) { + partition_ = builderForValue.build(); + } else { + partitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Batch partition to execute on.
+     * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + */ + public Builder mergePartition(com.google.spanner.executor.v1.BatchPartition value) { + if (partitionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && partition_ != null + && partition_ != com.google.spanner.executor.v1.BatchPartition.getDefaultInstance()) { + getPartitionBuilder().mergeFrom(value); + } else { + partition_ = value; + } + } else { + partitionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Batch partition to execute on.
+     * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + */ + public Builder clearPartition() { + bitField0_ = (bitField0_ & ~0x00000001); + partition_ = null; + if (partitionBuilder_ != null) { + partitionBuilder_.dispose(); + partitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Batch partition to execute on.
+     * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + */ + public com.google.spanner.executor.v1.BatchPartition.Builder getPartitionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Batch partition to execute on.
+     * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + */ + public com.google.spanner.executor.v1.BatchPartitionOrBuilder getPartitionOrBuilder() { + if (partitionBuilder_ != null) { + return partitionBuilder_.getMessageOrBuilder(); + } else { + return partition_ == null + ? com.google.spanner.executor.v1.BatchPartition.getDefaultInstance() + : partition_; + } + } + /** + * + * + *
+     * Batch partition to execute on.
+     * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.BatchPartition, + com.google.spanner.executor.v1.BatchPartition.Builder, + com.google.spanner.executor.v1.BatchPartitionOrBuilder> + getPartitionFieldBuilder() { + if (partitionBuilder_ == null) { + partitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.BatchPartition, + com.google.spanner.executor.v1.BatchPartition.Builder, + com.google.spanner.executor.v1.BatchPartitionOrBuilder>( + getPartition(), getParentForChildren(), isClean()); + partition_ = null; + } + return partitionBuilder_; + } + + @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.executor.v1.ExecutePartitionAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ExecutePartitionAction) + private static final com.google.spanner.executor.v1.ExecutePartitionAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ExecutePartitionAction(); + } + + public static com.google.spanner.executor.v1.ExecutePartitionAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecutePartitionAction 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.executor.v1.ExecutePartitionAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ExecutePartitionActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ExecutePartitionActionOrBuilder.java new file mode 100644 index 00000000000..a6b6713a9ed --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ExecutePartitionActionOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ExecutePartitionActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ExecutePartitionAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Batch partition to execute on.
+   * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + * + * @return Whether the partition field is set. + */ + boolean hasPartition(); + /** + * + * + *
+   * Batch partition to execute on.
+   * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + * + * @return The partition. + */ + com.google.spanner.executor.v1.BatchPartition getPartition(); + /** + * + * + *
+   * Batch partition to execute on.
+   * 
+ * + * .google.spanner.executor.v1.BatchPartition partition = 1; + */ + com.google.spanner.executor.v1.BatchPartitionOrBuilder getPartitionOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/FinishTransactionAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/FinishTransactionAction.java new file mode 100644 index 00000000000..7648770a9a4 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/FinishTransactionAction.java @@ -0,0 +1,765 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * FinishTransactionAction defines an action of finishing a transaction.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.FinishTransactionAction} + */ +public final class FinishTransactionAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.FinishTransactionAction) + FinishTransactionActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use FinishTransactionAction.newBuilder() to construct. + private FinishTransactionAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FinishTransactionAction() { + mode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FinishTransactionAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_FinishTransactionAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_FinishTransactionAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.FinishTransactionAction.class, + com.google.spanner.executor.v1.FinishTransactionAction.Builder.class); + } + + /** + * + * + *
+   * Mode indicates how the transaction should be finished.
+   * 
+ * + * Protobuf enum {@code google.spanner.executor.v1.FinishTransactionAction.Mode} + */ + public enum Mode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * "MODE_UNSPECIFIED" is equivalent to "COMMIT".
+     * 
+ * + * MODE_UNSPECIFIED = 0; + */ + MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Commit the transaction.
+     * 
+ * + * COMMIT = 1; + */ + COMMIT(1), + /** + * + * + *
+     * Drop the transaction without committing it.
+     * 
+ * + * ABANDON = 2; + */ + ABANDON(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * "MODE_UNSPECIFIED" is equivalent to "COMMIT".
+     * 
+ * + * MODE_UNSPECIFIED = 0; + */ + public static final int MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Commit the transaction.
+     * 
+ * + * COMMIT = 1; + */ + public static final int COMMIT_VALUE = 1; + /** + * + * + *
+     * Drop the transaction without committing it.
+     * 
+ * + * ABANDON = 2; + */ + public static final int ABANDON_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Mode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Mode forNumber(int value) { + switch (value) { + case 0: + return MODE_UNSPECIFIED; + case 1: + return COMMIT; + case 2: + return ABANDON; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Mode findValueByNumber(int number) { + return Mode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.spanner.executor.v1.FinishTransactionAction.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Mode[] VALUES = values(); + + public static Mode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Mode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.spanner.executor.v1.FinishTransactionAction.Mode) + } + + public static final int MODE_FIELD_NUMBER = 1; + private int mode_ = 0; + /** + * + * + *
+   * Defines how exactly the transaction should be completed, e.g. with
+   * commit or abortion.
+   * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction.Mode mode = 1; + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+   * Defines how exactly the transaction should be completed, e.g. with
+   * commit or abortion.
+   * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction.Mode mode = 1; + * + * @return The mode. + */ + @java.lang.Override + public com.google.spanner.executor.v1.FinishTransactionAction.Mode getMode() { + com.google.spanner.executor.v1.FinishTransactionAction.Mode result = + com.google.spanner.executor.v1.FinishTransactionAction.Mode.forNumber(mode_); + return result == null + ? com.google.spanner.executor.v1.FinishTransactionAction.Mode.UNRECOGNIZED + : result; + } + + 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 (mode_ + != com.google.spanner.executor.v1.FinishTransactionAction.Mode.MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, mode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mode_ + != com.google.spanner.executor.v1.FinishTransactionAction.Mode.MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); + } + 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.executor.v1.FinishTransactionAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.FinishTransactionAction other = + (com.google.spanner.executor.v1.FinishTransactionAction) obj; + + if (mode_ != other.mode_) 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) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.FinishTransactionAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.FinishTransactionAction 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.executor.v1.FinishTransactionAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.FinishTransactionAction 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.executor.v1.FinishTransactionAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.FinishTransactionAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.FinishTransactionAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.FinishTransactionAction 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.executor.v1.FinishTransactionAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.FinishTransactionAction 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.executor.v1.FinishTransactionAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.FinishTransactionAction 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.executor.v1.FinishTransactionAction 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; + } + /** + * + * + *
+   * FinishTransactionAction defines an action of finishing a transaction.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.FinishTransactionAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.FinishTransactionAction) + com.google.spanner.executor.v1.FinishTransactionActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_FinishTransactionAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_FinishTransactionAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.FinishTransactionAction.class, + com.google.spanner.executor.v1.FinishTransactionAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.FinishTransactionAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_FinishTransactionAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.FinishTransactionAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.FinishTransactionAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.FinishTransactionAction build() { + com.google.spanner.executor.v1.FinishTransactionAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.FinishTransactionAction buildPartial() { + com.google.spanner.executor.v1.FinishTransactionAction result = + new com.google.spanner.executor.v1.FinishTransactionAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.FinishTransactionAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mode_ = mode_; + } + } + + @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.executor.v1.FinishTransactionAction) { + return mergeFrom((com.google.spanner.executor.v1.FinishTransactionAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.FinishTransactionAction other) { + if (other == com.google.spanner.executor.v1.FinishTransactionAction.getDefaultInstance()) + return this; + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + 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: + { + mode_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 int mode_ = 0; + /** + * + * + *
+     * Defines how exactly the transaction should be completed, e.g. with
+     * commit or abortion.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction.Mode mode = 1; + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+     * Defines how exactly the transaction should be completed, e.g. with
+     * commit or abortion.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction.Mode mode = 1; + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + mode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines how exactly the transaction should be completed, e.g. with
+     * commit or abortion.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction.Mode mode = 1; + * + * @return The mode. + */ + @java.lang.Override + public com.google.spanner.executor.v1.FinishTransactionAction.Mode getMode() { + com.google.spanner.executor.v1.FinishTransactionAction.Mode result = + com.google.spanner.executor.v1.FinishTransactionAction.Mode.forNumber(mode_); + return result == null + ? com.google.spanner.executor.v1.FinishTransactionAction.Mode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Defines how exactly the transaction should be completed, e.g. with
+     * commit or abortion.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction.Mode mode = 1; + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(com.google.spanner.executor.v1.FinishTransactionAction.Mode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + mode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Defines how exactly the transaction should be completed, e.g. with
+     * commit or abortion.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction.Mode mode = 1; + * + * @return This builder for chaining. + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000001); + mode_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.FinishTransactionAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.FinishTransactionAction) + private static final com.google.spanner.executor.v1.FinishTransactionAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.FinishTransactionAction(); + } + + public static com.google.spanner.executor.v1.FinishTransactionAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FinishTransactionAction 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.executor.v1.FinishTransactionAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/FinishTransactionActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/FinishTransactionActionOrBuilder.java new file mode 100644 index 00000000000..9b8b1833b5f --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/FinishTransactionActionOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface FinishTransactionActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.FinishTransactionAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Defines how exactly the transaction should be completed, e.g. with
+   * commit or abortion.
+   * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction.Mode mode = 1; + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + /** + * + * + *
+   * Defines how exactly the transaction should be completed, e.g. with
+   * commit or abortion.
+   * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction.Mode mode = 1; + * + * @return The mode. + */ + com.google.spanner.executor.v1.FinishTransactionAction.Mode getMode(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GenerateDbPartitionsForQueryAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GenerateDbPartitionsForQueryAction.java new file mode 100644 index 00000000000..82558241ea1 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GenerateDbPartitionsForQueryAction.java @@ -0,0 +1,856 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Generate database partitions for the given query. Successful outcomes will
+ * contain database partitions in the db_partition field.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GenerateDbPartitionsForQueryAction} + */ +public final class GenerateDbPartitionsForQueryAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) + GenerateDbPartitionsForQueryActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateDbPartitionsForQueryAction.newBuilder() to construct. + private GenerateDbPartitionsForQueryAction( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateDbPartitionsForQueryAction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateDbPartitionsForQueryAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.class, + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.Builder.class); + } + + private int bitField0_; + public static final int QUERY_FIELD_NUMBER = 1; + private com.google.spanner.executor.v1.QueryAction query_; + /** + * + * + *
+   * Query to generate partitions for.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return query_ != null; + } + /** + * + * + *
+   * Query to generate partitions for.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + * + * @return The query. + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction getQuery() { + return query_ == null + ? com.google.spanner.executor.v1.QueryAction.getDefaultInstance() + : query_; + } + /** + * + * + *
+   * Query to generate partitions for.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryActionOrBuilder getQueryOrBuilder() { + return query_ == null + ? com.google.spanner.executor.v1.QueryAction.getDefaultInstance() + : query_; + } + + public static final int DESIRED_BYTES_PER_PARTITION_FIELD_NUMBER = 2; + private long desiredBytesPerPartition_ = 0L; + /** + * + * + *
+   * Desired size of data in each partition. Spanner doesn't guarantee to
+   * respect this value.
+   * 
+ * + * optional int64 desired_bytes_per_partition = 2; + * + * @return Whether the desiredBytesPerPartition field is set. + */ + @java.lang.Override + public boolean hasDesiredBytesPerPartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Desired size of data in each partition. Spanner doesn't guarantee to
+   * respect this value.
+   * 
+ * + * optional int64 desired_bytes_per_partition = 2; + * + * @return The desiredBytesPerPartition. + */ + @java.lang.Override + public long getDesiredBytesPerPartition() { + return desiredBytesPerPartition_; + } + + 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 (query_ != null) { + output.writeMessage(1, getQuery()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt64(2, desiredBytesPerPartition_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (query_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getQuery()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, desiredBytesPerPartition_); + } + 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.executor.v1.GenerateDbPartitionsForQueryAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction other = + (com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) obj; + + if (hasQuery() != other.hasQuery()) return false; + if (hasQuery()) { + if (!getQuery().equals(other.getQuery())) return false; + } + if (hasDesiredBytesPerPartition() != other.hasDesiredBytesPerPartition()) return false; + if (hasDesiredBytesPerPartition()) { + if (getDesiredBytesPerPartition() != other.getDesiredBytesPerPartition()) 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 (hasQuery()) { + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + } + if (hasDesiredBytesPerPartition()) { + hash = (37 * hash) + DESIRED_BYTES_PER_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDesiredBytesPerPartition()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction 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.executor.v1.GenerateDbPartitionsForQueryAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction 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.executor.v1.GenerateDbPartitionsForQueryAction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction 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.executor.v1.GenerateDbPartitionsForQueryAction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction + 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.executor.v1.GenerateDbPartitionsForQueryAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction 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.executor.v1.GenerateDbPartitionsForQueryAction 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; + } + /** + * + * + *
+   * Generate database partitions for the given query. Successful outcomes will
+   * contain database partitions in the db_partition field.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GenerateDbPartitionsForQueryAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.class, + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.Builder.class); + } + + // Construct using + // com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + desiredBytesPerPartition_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForQueryAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction + getDefaultInstanceForType() { + return com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction build() { + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction buildPartial() { + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction result = + new com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.query_ = queryBuilder_ == null ? query_ : queryBuilder_.build(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.desiredBytesPerPartition_ = desiredBytesPerPartition_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_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.executor.v1.GenerateDbPartitionsForQueryAction) { + return mergeFrom((com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction other) { + if (other + == com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.getDefaultInstance()) + return this; + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + if (other.hasDesiredBytesPerPartition()) { + setDesiredBytesPerPartition(other.getDesiredBytesPerPartition()); + } + 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: + { + input.readMessage(getQueryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + desiredBytesPerPartition_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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.spanner.executor.v1.QueryAction query_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder> + queryBuilder_; + /** + * + * + *
+     * Query to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + * + * @return Whether the query field is set. + */ + public boolean hasQuery() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Query to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + * + * @return The query. + */ + public com.google.spanner.executor.v1.QueryAction getQuery() { + if (queryBuilder_ == null) { + return query_ == null + ? com.google.spanner.executor.v1.QueryAction.getDefaultInstance() + : query_; + } else { + return queryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Query to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + */ + public Builder setQuery(com.google.spanner.executor.v1.QueryAction value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + } else { + queryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Query to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + */ + public Builder setQuery(com.google.spanner.executor.v1.QueryAction.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Query to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + */ + public Builder mergeQuery(com.google.spanner.executor.v1.QueryAction value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && query_ != null + && query_ != com.google.spanner.executor.v1.QueryAction.getDefaultInstance()) { + getQueryBuilder().mergeFrom(value); + } else { + query_ = value; + } + } else { + queryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Query to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + */ + public Builder clearQuery() { + bitField0_ = (bitField0_ & ~0x00000001); + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Query to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + */ + public com.google.spanner.executor.v1.QueryAction.Builder getQueryBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Query to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + */ + public com.google.spanner.executor.v1.QueryActionOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_ == null + ? com.google.spanner.executor.v1.QueryAction.getDefaultInstance() + : query_; + } + } + /** + * + * + *
+     * Query to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder>( + getQuery(), getParentForChildren(), isClean()); + query_ = null; + } + return queryBuilder_; + } + + private long desiredBytesPerPartition_; + /** + * + * + *
+     * Desired size of data in each partition. Spanner doesn't guarantee to
+     * respect this value.
+     * 
+ * + * optional int64 desired_bytes_per_partition = 2; + * + * @return Whether the desiredBytesPerPartition field is set. + */ + @java.lang.Override + public boolean hasDesiredBytesPerPartition() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Desired size of data in each partition. Spanner doesn't guarantee to
+     * respect this value.
+     * 
+ * + * optional int64 desired_bytes_per_partition = 2; + * + * @return The desiredBytesPerPartition. + */ + @java.lang.Override + public long getDesiredBytesPerPartition() { + return desiredBytesPerPartition_; + } + /** + * + * + *
+     * Desired size of data in each partition. Spanner doesn't guarantee to
+     * respect this value.
+     * 
+ * + * optional int64 desired_bytes_per_partition = 2; + * + * @param value The desiredBytesPerPartition to set. + * @return This builder for chaining. + */ + public Builder setDesiredBytesPerPartition(long value) { + + desiredBytesPerPartition_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Desired size of data in each partition. Spanner doesn't guarantee to
+     * respect this value.
+     * 
+ * + * optional int64 desired_bytes_per_partition = 2; + * + * @return This builder for chaining. + */ + public Builder clearDesiredBytesPerPartition() { + bitField0_ = (bitField0_ & ~0x00000002); + desiredBytesPerPartition_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) + private static final com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction(); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateDbPartitionsForQueryAction 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.executor.v1.GenerateDbPartitionsForQueryAction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GenerateDbPartitionsForQueryActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GenerateDbPartitionsForQueryActionOrBuilder.java new file mode 100644 index 00000000000..5fc93a7d88c --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GenerateDbPartitionsForQueryActionOrBuilder.java @@ -0,0 +1,87 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface GenerateDbPartitionsForQueryActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Query to generate partitions for.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + /** + * + * + *
+   * Query to generate partitions for.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + * + * @return The query. + */ + com.google.spanner.executor.v1.QueryAction getQuery(); + /** + * + * + *
+   * Query to generate partitions for.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction query = 1; + */ + com.google.spanner.executor.v1.QueryActionOrBuilder getQueryOrBuilder(); + + /** + * + * + *
+   * Desired size of data in each partition. Spanner doesn't guarantee to
+   * respect this value.
+   * 
+ * + * optional int64 desired_bytes_per_partition = 2; + * + * @return Whether the desiredBytesPerPartition field is set. + */ + boolean hasDesiredBytesPerPartition(); + /** + * + * + *
+   * Desired size of data in each partition. Spanner doesn't guarantee to
+   * respect this value.
+   * 
+ * + * optional int64 desired_bytes_per_partition = 2; + * + * @return The desiredBytesPerPartition. + */ + long getDesiredBytesPerPartition(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GenerateDbPartitionsForReadAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GenerateDbPartitionsForReadAction.java new file mode 100644 index 00000000000..4650176ef55 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GenerateDbPartitionsForReadAction.java @@ -0,0 +1,1479 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Generate database partitions for the given read. Successful outcomes will
+ * contain database partitions in the db_partition field.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GenerateDbPartitionsForReadAction} + */ +public final class GenerateDbPartitionsForReadAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GenerateDbPartitionsForReadAction) + GenerateDbPartitionsForReadActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateDbPartitionsForReadAction.newBuilder() to construct. + private GenerateDbPartitionsForReadAction( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateDbPartitionsForReadAction() { + table_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateDbPartitionsForReadAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.class, + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.Builder.class); + } + + private int bitField0_; + public static final int READ_FIELD_NUMBER = 1; + private com.google.spanner.executor.v1.ReadAction read_; + /** + * + * + *
+   * Read to generate partitions for.
+   * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + * + * @return Whether the read field is set. + */ + @java.lang.Override + public boolean hasRead() { + return read_ != null; + } + /** + * + * + *
+   * Read to generate partitions for.
+   * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + * + * @return The read. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ReadAction getRead() { + return read_ == null ? com.google.spanner.executor.v1.ReadAction.getDefaultInstance() : read_; + } + /** + * + * + *
+   * Read to generate partitions for.
+   * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ReadActionOrBuilder getReadOrBuilder() { + return read_ == null ? com.google.spanner.executor.v1.ReadAction.getDefaultInstance() : read_; + } + + public static final int TABLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List table_; + /** + * + * + *
+   * Metadata related to the tables involved in the read.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + @java.lang.Override + public java.util.List getTableList() { + return table_; + } + /** + * + * + *
+   * Metadata related to the tables involved in the read.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + @java.lang.Override + public java.util.List + getTableOrBuilderList() { + return table_; + } + /** + * + * + *
+   * Metadata related to the tables involved in the read.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + @java.lang.Override + public int getTableCount() { + return table_.size(); + } + /** + * + * + *
+   * Metadata related to the tables involved in the read.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.TableMetadata getTable(int index) { + return table_.get(index); + } + /** + * + * + *
+   * Metadata related to the tables involved in the read.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.TableMetadataOrBuilder getTableOrBuilder(int index) { + return table_.get(index); + } + + public static final int DESIRED_BYTES_PER_PARTITION_FIELD_NUMBER = 3; + private long desiredBytesPerPartition_ = 0L; + /** + * + * + *
+   * Desired size of data in each partition. Spanner doesn't guarantee to
+   * respect this value.
+   * 
+ * + * optional int64 desired_bytes_per_partition = 3; + * + * @return Whether the desiredBytesPerPartition field is set. + */ + @java.lang.Override + public boolean hasDesiredBytesPerPartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Desired size of data in each partition. Spanner doesn't guarantee to
+   * respect this value.
+   * 
+ * + * optional int64 desired_bytes_per_partition = 3; + * + * @return The desiredBytesPerPartition. + */ + @java.lang.Override + public long getDesiredBytesPerPartition() { + return desiredBytesPerPartition_; + } + + public static final int MAX_PARTITION_COUNT_FIELD_NUMBER = 4; + private long maxPartitionCount_ = 0L; + /** + * + * + *
+   * If set, the desired max number of partitions. Spanner doesn't guarantee to
+   * respect this value.
+   * 
+ * + * optional int64 max_partition_count = 4; + * + * @return Whether the maxPartitionCount field is set. + */ + @java.lang.Override + public boolean hasMaxPartitionCount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * If set, the desired max number of partitions. Spanner doesn't guarantee to
+   * respect this value.
+   * 
+ * + * optional int64 max_partition_count = 4; + * + * @return The maxPartitionCount. + */ + @java.lang.Override + public long getMaxPartitionCount() { + return maxPartitionCount_; + } + + 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 (read_ != null) { + output.writeMessage(1, getRead()); + } + for (int i = 0; i < table_.size(); i++) { + output.writeMessage(2, table_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt64(3, desiredBytesPerPartition_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt64(4, maxPartitionCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (read_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRead()); + } + for (int i = 0; i < table_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, table_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, desiredBytesPerPartition_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, maxPartitionCount_); + } + 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.executor.v1.GenerateDbPartitionsForReadAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction other = + (com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction) obj; + + if (hasRead() != other.hasRead()) return false; + if (hasRead()) { + if (!getRead().equals(other.getRead())) return false; + } + if (!getTableList().equals(other.getTableList())) return false; + if (hasDesiredBytesPerPartition() != other.hasDesiredBytesPerPartition()) return false; + if (hasDesiredBytesPerPartition()) { + if (getDesiredBytesPerPartition() != other.getDesiredBytesPerPartition()) return false; + } + if (hasMaxPartitionCount() != other.hasMaxPartitionCount()) return false; + if (hasMaxPartitionCount()) { + if (getMaxPartitionCount() != other.getMaxPartitionCount()) 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 (hasRead()) { + hash = (37 * hash) + READ_FIELD_NUMBER; + hash = (53 * hash) + getRead().hashCode(); + } + if (getTableCount() > 0) { + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTableList().hashCode(); + } + if (hasDesiredBytesPerPartition()) { + hash = (37 * hash) + DESIRED_BYTES_PER_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDesiredBytesPerPartition()); + } + if (hasMaxPartitionCount()) { + hash = (37 * hash) + MAX_PARTITION_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxPartitionCount()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction 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.executor.v1.GenerateDbPartitionsForReadAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction 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.executor.v1.GenerateDbPartitionsForReadAction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction 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.executor.v1.GenerateDbPartitionsForReadAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction 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.executor.v1.GenerateDbPartitionsForReadAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction 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.executor.v1.GenerateDbPartitionsForReadAction 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; + } + /** + * + * + *
+   * Generate database partitions for the given read. Successful outcomes will
+   * contain database partitions in the db_partition field.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GenerateDbPartitionsForReadAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GenerateDbPartitionsForReadAction) + com.google.spanner.executor.v1.GenerateDbPartitionsForReadActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.class, + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + read_ = null; + if (readBuilder_ != null) { + readBuilder_.dispose(); + readBuilder_ = null; + } + if (tableBuilder_ == null) { + table_ = java.util.Collections.emptyList(); + } else { + table_ = null; + tableBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + desiredBytesPerPartition_ = 0L; + maxPartitionCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GenerateDbPartitionsForReadAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction + getDefaultInstanceForType() { + return com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction build() { + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction buildPartial() { + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction result = + new com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction result) { + if (tableBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + table_ = java.util.Collections.unmodifiableList(table_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.table_ = table_; + } else { + result.table_ = tableBuilder_.build(); + } + } + + private void buildPartial0( + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.read_ = readBuilder_ == null ? read_ : readBuilder_.build(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.desiredBytesPerPartition_ = desiredBytesPerPartition_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.maxPartitionCount_ = maxPartitionCount_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_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.executor.v1.GenerateDbPartitionsForReadAction) { + return mergeFrom((com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction other) { + if (other + == com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.getDefaultInstance()) + return this; + if (other.hasRead()) { + mergeRead(other.getRead()); + } + if (tableBuilder_ == null) { + if (!other.table_.isEmpty()) { + if (table_.isEmpty()) { + table_ = other.table_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTableIsMutable(); + table_.addAll(other.table_); + } + onChanged(); + } + } else { + if (!other.table_.isEmpty()) { + if (tableBuilder_.isEmpty()) { + tableBuilder_.dispose(); + tableBuilder_ = null; + table_ = other.table_; + bitField0_ = (bitField0_ & ~0x00000002); + tableBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTableFieldBuilder() + : null; + } else { + tableBuilder_.addAllMessages(other.table_); + } + } + } + if (other.hasDesiredBytesPerPartition()) { + setDesiredBytesPerPartition(other.getDesiredBytesPerPartition()); + } + if (other.hasMaxPartitionCount()) { + setMaxPartitionCount(other.getMaxPartitionCount()); + } + 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: + { + input.readMessage(getReadFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.spanner.executor.v1.TableMetadata m = + input.readMessage( + com.google.spanner.executor.v1.TableMetadata.parser(), extensionRegistry); + if (tableBuilder_ == null) { + ensureTableIsMutable(); + table_.add(m); + } else { + tableBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + desiredBytesPerPartition_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + maxPartitionCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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.spanner.executor.v1.ReadAction read_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ReadAction, + com.google.spanner.executor.v1.ReadAction.Builder, + com.google.spanner.executor.v1.ReadActionOrBuilder> + readBuilder_; + /** + * + * + *
+     * Read to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + * + * @return Whether the read field is set. + */ + public boolean hasRead() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Read to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + * + * @return The read. + */ + public com.google.spanner.executor.v1.ReadAction getRead() { + if (readBuilder_ == null) { + return read_ == null + ? com.google.spanner.executor.v1.ReadAction.getDefaultInstance() + : read_; + } else { + return readBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Read to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + */ + public Builder setRead(com.google.spanner.executor.v1.ReadAction value) { + if (readBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + read_ = value; + } else { + readBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Read to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + */ + public Builder setRead(com.google.spanner.executor.v1.ReadAction.Builder builderForValue) { + if (readBuilder_ == null) { + read_ = builderForValue.build(); + } else { + readBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Read to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + */ + public Builder mergeRead(com.google.spanner.executor.v1.ReadAction value) { + if (readBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && read_ != null + && read_ != com.google.spanner.executor.v1.ReadAction.getDefaultInstance()) { + getReadBuilder().mergeFrom(value); + } else { + read_ = value; + } + } else { + readBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Read to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + */ + public Builder clearRead() { + bitField0_ = (bitField0_ & ~0x00000001); + read_ = null; + if (readBuilder_ != null) { + readBuilder_.dispose(); + readBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Read to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + */ + public com.google.spanner.executor.v1.ReadAction.Builder getReadBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getReadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Read to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + */ + public com.google.spanner.executor.v1.ReadActionOrBuilder getReadOrBuilder() { + if (readBuilder_ != null) { + return readBuilder_.getMessageOrBuilder(); + } else { + return read_ == null + ? com.google.spanner.executor.v1.ReadAction.getDefaultInstance() + : read_; + } + } + /** + * + * + *
+     * Read to generate partitions for.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ReadAction, + com.google.spanner.executor.v1.ReadAction.Builder, + com.google.spanner.executor.v1.ReadActionOrBuilder> + getReadFieldBuilder() { + if (readBuilder_ == null) { + readBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ReadAction, + com.google.spanner.executor.v1.ReadAction.Builder, + com.google.spanner.executor.v1.ReadActionOrBuilder>( + getRead(), getParentForChildren(), isClean()); + read_ = null; + } + return readBuilder_; + } + + private java.util.List table_ = + java.util.Collections.emptyList(); + + private void ensureTableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + table_ = new java.util.ArrayList(table_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.TableMetadata, + com.google.spanner.executor.v1.TableMetadata.Builder, + com.google.spanner.executor.v1.TableMetadataOrBuilder> + tableBuilder_; + + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public java.util.List getTableList() { + if (tableBuilder_ == null) { + return java.util.Collections.unmodifiableList(table_); + } else { + return tableBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public int getTableCount() { + if (tableBuilder_ == null) { + return table_.size(); + } else { + return tableBuilder_.getCount(); + } + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public com.google.spanner.executor.v1.TableMetadata getTable(int index) { + if (tableBuilder_ == null) { + return table_.get(index); + } else { + return tableBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder setTable(int index, com.google.spanner.executor.v1.TableMetadata value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableIsMutable(); + table_.set(index, value); + onChanged(); + } else { + tableBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder setTable( + int index, com.google.spanner.executor.v1.TableMetadata.Builder builderForValue) { + if (tableBuilder_ == null) { + ensureTableIsMutable(); + table_.set(index, builderForValue.build()); + onChanged(); + } else { + tableBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder addTable(com.google.spanner.executor.v1.TableMetadata value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableIsMutable(); + table_.add(value); + onChanged(); + } else { + tableBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder addTable(int index, com.google.spanner.executor.v1.TableMetadata value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableIsMutable(); + table_.add(index, value); + onChanged(); + } else { + tableBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder addTable(com.google.spanner.executor.v1.TableMetadata.Builder builderForValue) { + if (tableBuilder_ == null) { + ensureTableIsMutable(); + table_.add(builderForValue.build()); + onChanged(); + } else { + tableBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder addTable( + int index, com.google.spanner.executor.v1.TableMetadata.Builder builderForValue) { + if (tableBuilder_ == null) { + ensureTableIsMutable(); + table_.add(index, builderForValue.build()); + onChanged(); + } else { + tableBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder addAllTable( + java.lang.Iterable values) { + if (tableBuilder_ == null) { + ensureTableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, table_); + onChanged(); + } else { + tableBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder clearTable() { + if (tableBuilder_ == null) { + table_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + tableBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder removeTable(int index) { + if (tableBuilder_ == null) { + ensureTableIsMutable(); + table_.remove(index); + onChanged(); + } else { + tableBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public com.google.spanner.executor.v1.TableMetadata.Builder getTableBuilder(int index) { + return getTableFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public com.google.spanner.executor.v1.TableMetadataOrBuilder getTableOrBuilder(int index) { + if (tableBuilder_ == null) { + return table_.get(index); + } else { + return tableBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public java.util.List + getTableOrBuilderList() { + if (tableBuilder_ != null) { + return tableBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(table_); + } + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public com.google.spanner.executor.v1.TableMetadata.Builder addTableBuilder() { + return getTableFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.TableMetadata.getDefaultInstance()); + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public com.google.spanner.executor.v1.TableMetadata.Builder addTableBuilder(int index) { + return getTableFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.TableMetadata.getDefaultInstance()); + } + /** + * + * + *
+     * Metadata related to the tables involved in the read.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public java.util.List + getTableBuilderList() { + return getTableFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.TableMetadata, + com.google.spanner.executor.v1.TableMetadata.Builder, + com.google.spanner.executor.v1.TableMetadataOrBuilder> + getTableFieldBuilder() { + if (tableBuilder_ == null) { + tableBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.TableMetadata, + com.google.spanner.executor.v1.TableMetadata.Builder, + com.google.spanner.executor.v1.TableMetadataOrBuilder>( + table_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + table_ = null; + } + return tableBuilder_; + } + + private long desiredBytesPerPartition_; + /** + * + * + *
+     * Desired size of data in each partition. Spanner doesn't guarantee to
+     * respect this value.
+     * 
+ * + * optional int64 desired_bytes_per_partition = 3; + * + * @return Whether the desiredBytesPerPartition field is set. + */ + @java.lang.Override + public boolean hasDesiredBytesPerPartition() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Desired size of data in each partition. Spanner doesn't guarantee to
+     * respect this value.
+     * 
+ * + * optional int64 desired_bytes_per_partition = 3; + * + * @return The desiredBytesPerPartition. + */ + @java.lang.Override + public long getDesiredBytesPerPartition() { + return desiredBytesPerPartition_; + } + /** + * + * + *
+     * Desired size of data in each partition. Spanner doesn't guarantee to
+     * respect this value.
+     * 
+ * + * optional int64 desired_bytes_per_partition = 3; + * + * @param value The desiredBytesPerPartition to set. + * @return This builder for chaining. + */ + public Builder setDesiredBytesPerPartition(long value) { + + desiredBytesPerPartition_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Desired size of data in each partition. Spanner doesn't guarantee to
+     * respect this value.
+     * 
+ * + * optional int64 desired_bytes_per_partition = 3; + * + * @return This builder for chaining. + */ + public Builder clearDesiredBytesPerPartition() { + bitField0_ = (bitField0_ & ~0x00000004); + desiredBytesPerPartition_ = 0L; + onChanged(); + return this; + } + + private long maxPartitionCount_; + /** + * + * + *
+     * If set, the desired max number of partitions. Spanner doesn't guarantee to
+     * respect this value.
+     * 
+ * + * optional int64 max_partition_count = 4; + * + * @return Whether the maxPartitionCount field is set. + */ + @java.lang.Override + public boolean hasMaxPartitionCount() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * If set, the desired max number of partitions. Spanner doesn't guarantee to
+     * respect this value.
+     * 
+ * + * optional int64 max_partition_count = 4; + * + * @return The maxPartitionCount. + */ + @java.lang.Override + public long getMaxPartitionCount() { + return maxPartitionCount_; + } + /** + * + * + *
+     * If set, the desired max number of partitions. Spanner doesn't guarantee to
+     * respect this value.
+     * 
+ * + * optional int64 max_partition_count = 4; + * + * @param value The maxPartitionCount to set. + * @return This builder for chaining. + */ + public Builder setMaxPartitionCount(long value) { + + maxPartitionCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, the desired max number of partitions. Spanner doesn't guarantee to
+     * respect this value.
+     * 
+ * + * optional int64 max_partition_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearMaxPartitionCount() { + bitField0_ = (bitField0_ & ~0x00000008); + maxPartitionCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.GenerateDbPartitionsForReadAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.GenerateDbPartitionsForReadAction) + private static final com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction(); + } + + public static com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateDbPartitionsForReadAction 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.executor.v1.GenerateDbPartitionsForReadAction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GenerateDbPartitionsForReadActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GenerateDbPartitionsForReadActionOrBuilder.java new file mode 100644 index 00000000000..894e57aeaa0 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GenerateDbPartitionsForReadActionOrBuilder.java @@ -0,0 +1,166 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface GenerateDbPartitionsForReadActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GenerateDbPartitionsForReadAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Read to generate partitions for.
+   * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + * + * @return Whether the read field is set. + */ + boolean hasRead(); + /** + * + * + *
+   * Read to generate partitions for.
+   * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + * + * @return The read. + */ + com.google.spanner.executor.v1.ReadAction getRead(); + /** + * + * + *
+   * Read to generate partitions for.
+   * 
+ * + * .google.spanner.executor.v1.ReadAction read = 1; + */ + com.google.spanner.executor.v1.ReadActionOrBuilder getReadOrBuilder(); + + /** + * + * + *
+   * Metadata related to the tables involved in the read.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + java.util.List getTableList(); + /** + * + * + *
+   * Metadata related to the tables involved in the read.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + com.google.spanner.executor.v1.TableMetadata getTable(int index); + /** + * + * + *
+   * Metadata related to the tables involved in the read.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + int getTableCount(); + /** + * + * + *
+   * Metadata related to the tables involved in the read.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + java.util.List + getTableOrBuilderList(); + /** + * + * + *
+   * Metadata related to the tables involved in the read.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + com.google.spanner.executor.v1.TableMetadataOrBuilder getTableOrBuilder(int index); + + /** + * + * + *
+   * Desired size of data in each partition. Spanner doesn't guarantee to
+   * respect this value.
+   * 
+ * + * optional int64 desired_bytes_per_partition = 3; + * + * @return Whether the desiredBytesPerPartition field is set. + */ + boolean hasDesiredBytesPerPartition(); + /** + * + * + *
+   * Desired size of data in each partition. Spanner doesn't guarantee to
+   * respect this value.
+   * 
+ * + * optional int64 desired_bytes_per_partition = 3; + * + * @return The desiredBytesPerPartition. + */ + long getDesiredBytesPerPartition(); + + /** + * + * + *
+   * If set, the desired max number of partitions. Spanner doesn't guarantee to
+   * respect this value.
+   * 
+ * + * optional int64 max_partition_count = 4; + * + * @return Whether the maxPartitionCount field is set. + */ + boolean hasMaxPartitionCount(); + /** + * + * + *
+   * If set, the desired max number of partitions. Spanner doesn't guarantee to
+   * respect this value.
+   * 
+ * + * optional int64 max_partition_count = 4; + * + * @return The maxPartitionCount. + */ + long getMaxPartitionCount(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudBackupAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudBackupAction.java new file mode 100644 index 00000000000..d3f8cbc5e68 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudBackupAction.java @@ -0,0 +1,988 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that gets a Cloud Spanner database backup.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GetCloudBackupAction} + */ +public final class GetCloudBackupAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GetCloudBackupAction) + GetCloudBackupActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCloudBackupAction.newBuilder() to construct. + private GetCloudBackupAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCloudBackupAction() { + projectId_ = ""; + instanceId_ = ""; + backupId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCloudBackupAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudBackupAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudBackupAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GetCloudBackupAction.class, + com.google.spanner.executor.v1.GetCloudBackupAction.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupId_ = ""; + /** + * + * + *
+   * The id of the backup to get, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + @java.lang.Override + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + 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(); + backupId_ = s; + return s; + } + } + /** + * + * + *
+   * The id of the backup to get, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); + } + 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.executor.v1.GetCloudBackupAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.GetCloudBackupAction other = + (com.google.spanner.executor.v1.GetCloudBackupAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getBackupId().equals(other.getBackupId())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.GetCloudBackupAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetCloudBackupAction 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.executor.v1.GetCloudBackupAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetCloudBackupAction 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.executor.v1.GetCloudBackupAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetCloudBackupAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.GetCloudBackupAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetCloudBackupAction 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.executor.v1.GetCloudBackupAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetCloudBackupAction 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.executor.v1.GetCloudBackupAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetCloudBackupAction 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.executor.v1.GetCloudBackupAction 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; + } + /** + * + * + *
+   * Action that gets a Cloud Spanner database backup.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GetCloudBackupAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GetCloudBackupAction) + com.google.spanner.executor.v1.GetCloudBackupActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudBackupAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudBackupAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GetCloudBackupAction.class, + com.google.spanner.executor.v1.GetCloudBackupAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.GetCloudBackupAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + backupId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudBackupAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudBackupAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.GetCloudBackupAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudBackupAction build() { + com.google.spanner.executor.v1.GetCloudBackupAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudBackupAction buildPartial() { + com.google.spanner.executor.v1.GetCloudBackupAction result = + new com.google.spanner.executor.v1.GetCloudBackupAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.GetCloudBackupAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupId_ = backupId_; + } + } + + @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.executor.v1.GetCloudBackupAction) { + return mergeFrom((com.google.spanner.executor.v1.GetCloudBackupAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.GetCloudBackupAction other) { + if (other == com.google.spanner.executor.v1.GetCloudBackupAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getBackupId().isEmpty()) { + backupId_ = other.backupId_; + bitField0_ |= 0x00000004; + onChanged(); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + backupId_ = input.readStringRequireUtf8(); + 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 java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object backupId_ = ""; + /** + * + * + *
+     * The id of the backup to get, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The id of the backup to get, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The id of the backup to get, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @param value The backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the backup to get, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearBackupId() { + backupId_ = getDefaultInstance().getBackupId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the backup to get, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @param value The bytes for backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.GetCloudBackupAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.GetCloudBackupAction) + private static final com.google.spanner.executor.v1.GetCloudBackupAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.GetCloudBackupAction(); + } + + public static com.google.spanner.executor.v1.GetCloudBackupAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCloudBackupAction 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.executor.v1.GetCloudBackupAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudBackupActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudBackupActionOrBuilder.java new file mode 100644 index 00000000000..993df879633 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudBackupActionOrBuilder.java @@ -0,0 +1,100 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface GetCloudBackupActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GetCloudBackupAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * The id of the backup to get, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + java.lang.String getBackupId(); + /** + * + * + *
+   * The id of the backup to get, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + com.google.protobuf.ByteString getBackupIdBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudDatabaseAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudDatabaseAction.java new file mode 100644 index 00000000000..bda9567e815 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudDatabaseAction.java @@ -0,0 +1,989 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that gets a Cloud Spanner database.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GetCloudDatabaseAction} + */ +public final class GetCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GetCloudDatabaseAction) + GetCloudDatabaseActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCloudDatabaseAction.newBuilder() to construct. + private GetCloudDatabaseAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCloudDatabaseAction() { + projectId_ = ""; + instanceId_ = ""; + databaseId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCloudDatabaseAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GetCloudDatabaseAction.class, + com.google.spanner.executor.v1.GetCloudDatabaseAction.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseId_ = ""; + /** + * + * + *
+   * The id of the database to get, e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + @java.lang.Override + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + 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(); + databaseId_ = s; + return s; + } + } + /** + * + * + *
+   * The id of the database to get, e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseId_); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseId_); + } + 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.executor.v1.GetCloudDatabaseAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.GetCloudDatabaseAction other = + (com.google.spanner.executor.v1.GetCloudDatabaseAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getDatabaseId().equals(other.getDatabaseId())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.GetCloudDatabaseAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetCloudDatabaseAction 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.executor.v1.GetCloudDatabaseAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetCloudDatabaseAction 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.executor.v1.GetCloudDatabaseAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetCloudDatabaseAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.GetCloudDatabaseAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetCloudDatabaseAction 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.executor.v1.GetCloudDatabaseAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetCloudDatabaseAction 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.executor.v1.GetCloudDatabaseAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetCloudDatabaseAction 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.executor.v1.GetCloudDatabaseAction 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; + } + /** + * + * + *
+   * Action that gets a Cloud Spanner database.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GetCloudDatabaseAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GetCloudDatabaseAction) + com.google.spanner.executor.v1.GetCloudDatabaseActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GetCloudDatabaseAction.class, + com.google.spanner.executor.v1.GetCloudDatabaseAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.GetCloudDatabaseAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + databaseId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudDatabaseAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudDatabaseAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.GetCloudDatabaseAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudDatabaseAction build() { + com.google.spanner.executor.v1.GetCloudDatabaseAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudDatabaseAction buildPartial() { + com.google.spanner.executor.v1.GetCloudDatabaseAction result = + new com.google.spanner.executor.v1.GetCloudDatabaseAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.GetCloudDatabaseAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.databaseId_ = databaseId_; + } + } + + @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.executor.v1.GetCloudDatabaseAction) { + return mergeFrom((com.google.spanner.executor.v1.GetCloudDatabaseAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.GetCloudDatabaseAction other) { + if (other == com.google.spanner.executor.v1.GetCloudDatabaseAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDatabaseId().isEmpty()) { + databaseId_ = other.databaseId_; + bitField0_ |= 0x00000004; + onChanged(); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + databaseId_ = input.readStringRequireUtf8(); + 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 java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object databaseId_ = ""; + /** + * + * + *
+     * The id of the database to get, e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The id of the database to get, e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The id of the database to get, e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the database to get, e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + databaseId_ = getDefaultInstance().getDatabaseId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the database to get, e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @param value The bytes for databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.GetCloudDatabaseAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.GetCloudDatabaseAction) + private static final com.google.spanner.executor.v1.GetCloudDatabaseAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.GetCloudDatabaseAction(); + } + + public static com.google.spanner.executor.v1.GetCloudDatabaseAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCloudDatabaseAction 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.executor.v1.GetCloudDatabaseAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudDatabaseActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudDatabaseActionOrBuilder.java new file mode 100644 index 00000000000..39196819f75 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudDatabaseActionOrBuilder.java @@ -0,0 +1,100 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface GetCloudDatabaseActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GetCloudDatabaseAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * The id of the database to get, e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + java.lang.String getDatabaseId(); + /** + * + * + *
+   * The id of the database to get, e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + com.google.protobuf.ByteString getDatabaseIdBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudInstanceAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudInstanceAction.java new file mode 100644 index 00000000000..5e0a0e201df --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudInstanceAction.java @@ -0,0 +1,814 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that retrieves a Cloud Spanner instance.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GetCloudInstanceAction} + */ +public final class GetCloudInstanceAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GetCloudInstanceAction) + GetCloudInstanceActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCloudInstanceAction.newBuilder() to construct. + private GetCloudInstanceAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCloudInstanceAction() { + projectId_ = ""; + instanceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCloudInstanceAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudInstanceAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudInstanceAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GetCloudInstanceAction.class, + com.google.spanner.executor.v1.GetCloudInstanceAction.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path) to retrieve the instance from,
+   * e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path) to retrieve the instance from,
+   * e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + 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.executor.v1.GetCloudInstanceAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.GetCloudInstanceAction other = + (com.google.spanner.executor.v1.GetCloudInstanceAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.GetCloudInstanceAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceAction 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.executor.v1.GetCloudInstanceAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceAction 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.executor.v1.GetCloudInstanceAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceAction 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.executor.v1.GetCloudInstanceAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceAction 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.executor.v1.GetCloudInstanceAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceAction 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.executor.v1.GetCloudInstanceAction 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; + } + /** + * + * + *
+   * Action that retrieves a Cloud Spanner instance.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GetCloudInstanceAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GetCloudInstanceAction) + com.google.spanner.executor.v1.GetCloudInstanceActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudInstanceAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudInstanceAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GetCloudInstanceAction.class, + com.google.spanner.executor.v1.GetCloudInstanceAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.GetCloudInstanceAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudInstanceAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.GetCloudInstanceAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceAction build() { + com.google.spanner.executor.v1.GetCloudInstanceAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceAction buildPartial() { + com.google.spanner.executor.v1.GetCloudInstanceAction result = + new com.google.spanner.executor.v1.GetCloudInstanceAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.GetCloudInstanceAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + } + + @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.executor.v1.GetCloudInstanceAction) { + return mergeFrom((com.google.spanner.executor.v1.GetCloudInstanceAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.GetCloudInstanceAction other) { + if (other == com.google.spanner.executor.v1.GetCloudInstanceAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path) to retrieve the instance from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) to retrieve the instance from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) to retrieve the instance from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) to retrieve the instance from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) to retrieve the instance from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.GetCloudInstanceAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.GetCloudInstanceAction) + private static final com.google.spanner.executor.v1.GetCloudInstanceAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.GetCloudInstanceAction(); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCloudInstanceAction 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.executor.v1.GetCloudInstanceAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudInstanceActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudInstanceActionOrBuilder.java new file mode 100644 index 00000000000..95714251e02 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudInstanceActionOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface GetCloudInstanceActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GetCloudInstanceAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path) to retrieve the instance from,
+   * e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path) to retrieve the instance from,
+   * e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudInstanceConfigAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudInstanceConfigAction.java new file mode 100644 index 00000000000..1be88c14e67 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudInstanceConfigAction.java @@ -0,0 +1,807 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that gets a user instance config.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GetCloudInstanceConfigAction} + */ +public final class GetCloudInstanceConfigAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GetCloudInstanceConfigAction) + GetCloudInstanceConfigActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCloudInstanceConfigAction.newBuilder() to construct. + private GetCloudInstanceConfigAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCloudInstanceConfigAction() { + instanceConfigId_ = ""; + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCloudInstanceConfigAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GetCloudInstanceConfigAction.class, + com.google.spanner.executor.v1.GetCloudInstanceConfigAction.Builder.class); + } + + public static final int INSTANCE_CONFIG_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceConfigId_ = ""; + /** + * + * + *
+   * Instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string instance_config_id = 1; + * + * @return The instanceConfigId. + */ + @java.lang.Override + public java.lang.String getInstanceConfigId() { + java.lang.Object ref = instanceConfigId_; + 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(); + instanceConfigId_ = s; + return s; + } + } + /** + * + * + *
+   * Instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string instance_config_id = 1; + * + * @return The bytes for instanceConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceConfigIdBytes() { + java.lang.Object ref = instanceConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(instanceConfigId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceConfigId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + 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(instanceConfigId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceConfigId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + 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.executor.v1.GetCloudInstanceConfigAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.GetCloudInstanceConfigAction other = + (com.google.spanner.executor.v1.GetCloudInstanceConfigAction) obj; + + if (!getInstanceConfigId().equals(other.getInstanceConfigId())) return false; + if (!getProjectId().equals(other.getProjectId())) 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) + INSTANCE_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceConfigId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.GetCloudInstanceConfigAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceConfigAction 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.executor.v1.GetCloudInstanceConfigAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceConfigAction 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.executor.v1.GetCloudInstanceConfigAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceConfigAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceConfigAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceConfigAction 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.executor.v1.GetCloudInstanceConfigAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceConfigAction 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.executor.v1.GetCloudInstanceConfigAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceConfigAction 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.executor.v1.GetCloudInstanceConfigAction 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; + } + /** + * + * + *
+   * Action that gets a user instance config.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GetCloudInstanceConfigAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GetCloudInstanceConfigAction) + com.google.spanner.executor.v1.GetCloudInstanceConfigActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GetCloudInstanceConfigAction.class, + com.google.spanner.executor.v1.GetCloudInstanceConfigAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.GetCloudInstanceConfigAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceConfigId_ = ""; + projectId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetCloudInstanceConfigAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceConfigAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.GetCloudInstanceConfigAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceConfigAction build() { + com.google.spanner.executor.v1.GetCloudInstanceConfigAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetCloudInstanceConfigAction buildPartial() { + com.google.spanner.executor.v1.GetCloudInstanceConfigAction result = + new com.google.spanner.executor.v1.GetCloudInstanceConfigAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.GetCloudInstanceConfigAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceConfigId_ = instanceConfigId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + } + + @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.executor.v1.GetCloudInstanceConfigAction) { + return mergeFrom((com.google.spanner.executor.v1.GetCloudInstanceConfigAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.GetCloudInstanceConfigAction other) { + if (other == com.google.spanner.executor.v1.GetCloudInstanceConfigAction.getDefaultInstance()) + return this; + if (!other.getInstanceConfigId().isEmpty()) { + instanceConfigId_ = other.instanceConfigId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + 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: + { + instanceConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 instanceConfigId_ = ""; + /** + * + * + *
+     * Instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string instance_config_id = 1; + * + * @return The instanceConfigId. + */ + public java.lang.String getInstanceConfigId() { + java.lang.Object ref = instanceConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string instance_config_id = 1; + * + * @return The bytes for instanceConfigId. + */ + public com.google.protobuf.ByteString getInstanceConfigIdBytes() { + java.lang.Object ref = instanceConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string instance_config_id = 1; + * + * @param value The instanceConfigId to set. + * @return This builder for chaining. + */ + public Builder setInstanceConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceConfigId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string instance_config_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearInstanceConfigId() { + instanceConfigId_ = getDefaultInstance().getInstanceConfigId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string instance_config_id = 1; + * + * @param value The bytes for instanceConfigId to set. + * @return This builder for chaining. + */ + public Builder setInstanceConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceConfigId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.GetCloudInstanceConfigAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.GetCloudInstanceConfigAction) + private static final com.google.spanner.executor.v1.GetCloudInstanceConfigAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.GetCloudInstanceConfigAction(); + } + + public static com.google.spanner.executor.v1.GetCloudInstanceConfigAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCloudInstanceConfigAction 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.executor.v1.GetCloudInstanceConfigAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudInstanceConfigActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudInstanceConfigActionOrBuilder.java new file mode 100644 index 00000000000..a15a7820bb6 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetCloudInstanceConfigActionOrBuilder.java @@ -0,0 +1,75 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface GetCloudInstanceConfigActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GetCloudInstanceConfigAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string instance_config_id = 1; + * + * @return The instanceConfigId. + */ + java.lang.String getInstanceConfigId(); + /** + * + * + *
+   * Instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string instance_config_id = 1; + * + * @return The bytes for instanceConfigId. + */ + com.google.protobuf.ByteString getInstanceConfigIdBytes(); + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetOperationAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetOperationAction.java new file mode 100644 index 00000000000..e5dfcecd53d --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetOperationAction.java @@ -0,0 +1,624 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that gets an operation.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GetOperationAction} + */ +public final class GetOperationAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.GetOperationAction) + GetOperationActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetOperationAction.newBuilder() to construct. + private GetOperationAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetOperationAction() { + operation_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetOperationAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetOperationAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetOperationAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GetOperationAction.class, + com.google.spanner.executor.v1.GetOperationAction.Builder.class); + } + + public static final int OPERATION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object operation_ = ""; + /** + * + * + *
+   * The name of the operation resource.
+   * 
+ * + * string operation = 1; + * + * @return The operation. + */ + @java.lang.Override + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + 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(); + operation_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the operation resource.
+   * 
+ * + * string operation = 1; + * + * @return The bytes for operation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(operation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, operation_); + } + 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(operation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operation_); + } + 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.executor.v1.GetOperationAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.GetOperationAction other = + (com.google.spanner.executor.v1.GetOperationAction) obj; + + if (!getOperation().equals(other.getOperation())) 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) + OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getOperation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.GetOperationAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetOperationAction 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.executor.v1.GetOperationAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetOperationAction 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.executor.v1.GetOperationAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.GetOperationAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.GetOperationAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetOperationAction 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.executor.v1.GetOperationAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetOperationAction 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.executor.v1.GetOperationAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.GetOperationAction 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.executor.v1.GetOperationAction 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; + } + /** + * + * + *
+   * Action that gets an operation.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.GetOperationAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.GetOperationAction) + com.google.spanner.executor.v1.GetOperationActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetOperationAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetOperationAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.GetOperationAction.class, + com.google.spanner.executor.v1.GetOperationAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.GetOperationAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_GetOperationAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetOperationAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.GetOperationAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetOperationAction build() { + com.google.spanner.executor.v1.GetOperationAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.GetOperationAction buildPartial() { + com.google.spanner.executor.v1.GetOperationAction result = + new com.google.spanner.executor.v1.GetOperationAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.GetOperationAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operation_ = operation_; + } + } + + @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.executor.v1.GetOperationAction) { + return mergeFrom((com.google.spanner.executor.v1.GetOperationAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.GetOperationAction other) { + if (other == com.google.spanner.executor.v1.GetOperationAction.getDefaultInstance()) + return this; + if (!other.getOperation().isEmpty()) { + operation_ = other.operation_; + bitField0_ |= 0x00000001; + onChanged(); + } + 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: + { + operation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + 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.lang.Object operation_ = ""; + /** + * + * + *
+     * The name of the operation resource.
+     * 
+ * + * string operation = 1; + * + * @return The operation. + */ + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the operation resource.
+     * 
+ * + * string operation = 1; + * + * @return The bytes for operation. + */ + public com.google.protobuf.ByteString getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the operation resource.
+     * 
+ * + * string operation = 1; + * + * @param value The operation to set. + * @return This builder for chaining. + */ + public Builder setOperation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + operation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the operation resource.
+     * 
+ * + * string operation = 1; + * + * @return This builder for chaining. + */ + public Builder clearOperation() { + operation_ = getDefaultInstance().getOperation(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the operation resource.
+     * 
+ * + * string operation = 1; + * + * @param value The bytes for operation to set. + * @return This builder for chaining. + */ + public Builder setOperationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + operation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.GetOperationAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.GetOperationAction) + private static final com.google.spanner.executor.v1.GetOperationAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.GetOperationAction(); + } + + public static com.google.spanner.executor.v1.GetOperationAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOperationAction 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.executor.v1.GetOperationAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetOperationActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetOperationActionOrBuilder.java new file mode 100644 index 00000000000..6148a800015 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/GetOperationActionOrBuilder.java @@ -0,0 +1,50 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface GetOperationActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.GetOperationAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the operation resource.
+   * 
+ * + * string operation = 1; + * + * @return The operation. + */ + java.lang.String getOperation(); + /** + * + * + *
+   * The name of the operation resource.
+   * 
+ * + * string operation = 1; + * + * @return The bytes for operation. + */ + com.google.protobuf.ByteString getOperationBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/HeartbeatRecord.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/HeartbeatRecord.java new file mode 100644 index 00000000000..6ca0298ebb8 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/HeartbeatRecord.java @@ -0,0 +1,705 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * ChangeStream heartbeat record.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.HeartbeatRecord} + */ +public final class HeartbeatRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.HeartbeatRecord) + HeartbeatRecordOrBuilder { + private static final long serialVersionUID = 0L; + // Use HeartbeatRecord.newBuilder() to construct. + private HeartbeatRecord(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HeartbeatRecord() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HeartbeatRecord(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_HeartbeatRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_HeartbeatRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.HeartbeatRecord.class, + com.google.spanner.executor.v1.HeartbeatRecord.Builder.class); + } + + public static final int HEARTBEAT_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp heartbeatTime_; + /** + * + * + *
+   * Timestamp for this heartbeat check.
+   * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + * + * @return Whether the heartbeatTime field is set. + */ + @java.lang.Override + public boolean hasHeartbeatTime() { + return heartbeatTime_ != null; + } + /** + * + * + *
+   * Timestamp for this heartbeat check.
+   * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + * + * @return The heartbeatTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getHeartbeatTime() { + return heartbeatTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : heartbeatTime_; + } + /** + * + * + *
+   * Timestamp for this heartbeat check.
+   * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getHeartbeatTimeOrBuilder() { + return heartbeatTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : heartbeatTime_; + } + + 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 (heartbeatTime_ != null) { + output.writeMessage(1, getHeartbeatTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (heartbeatTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeartbeatTime()); + } + 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.executor.v1.HeartbeatRecord)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.HeartbeatRecord other = + (com.google.spanner.executor.v1.HeartbeatRecord) obj; + + if (hasHeartbeatTime() != other.hasHeartbeatTime()) return false; + if (hasHeartbeatTime()) { + if (!getHeartbeatTime().equals(other.getHeartbeatTime())) 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 (hasHeartbeatTime()) { + hash = (37 * hash) + HEARTBEAT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getHeartbeatTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.HeartbeatRecord parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.HeartbeatRecord 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.executor.v1.HeartbeatRecord parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.HeartbeatRecord 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.executor.v1.HeartbeatRecord parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.HeartbeatRecord parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.HeartbeatRecord parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.HeartbeatRecord 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.executor.v1.HeartbeatRecord parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.HeartbeatRecord 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.executor.v1.HeartbeatRecord parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.HeartbeatRecord 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.executor.v1.HeartbeatRecord 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; + } + /** + * + * + *
+   * ChangeStream heartbeat record.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.HeartbeatRecord} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.HeartbeatRecord) + com.google.spanner.executor.v1.HeartbeatRecordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_HeartbeatRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_HeartbeatRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.HeartbeatRecord.class, + com.google.spanner.executor.v1.HeartbeatRecord.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.HeartbeatRecord.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + heartbeatTime_ = null; + if (heartbeatTimeBuilder_ != null) { + heartbeatTimeBuilder_.dispose(); + heartbeatTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_HeartbeatRecord_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.HeartbeatRecord getDefaultInstanceForType() { + return com.google.spanner.executor.v1.HeartbeatRecord.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.HeartbeatRecord build() { + com.google.spanner.executor.v1.HeartbeatRecord result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.HeartbeatRecord buildPartial() { + com.google.spanner.executor.v1.HeartbeatRecord result = + new com.google.spanner.executor.v1.HeartbeatRecord(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.HeartbeatRecord result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.heartbeatTime_ = + heartbeatTimeBuilder_ == null ? heartbeatTime_ : heartbeatTimeBuilder_.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.executor.v1.HeartbeatRecord) { + return mergeFrom((com.google.spanner.executor.v1.HeartbeatRecord) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.HeartbeatRecord other) { + if (other == com.google.spanner.executor.v1.HeartbeatRecord.getDefaultInstance()) return this; + if (other.hasHeartbeatTime()) { + mergeHeartbeatTime(other.getHeartbeatTime()); + } + 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: + { + input.readMessage(getHeartbeatTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + 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 com.google.protobuf.Timestamp heartbeatTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + heartbeatTimeBuilder_; + /** + * + * + *
+     * Timestamp for this heartbeat check.
+     * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + * + * @return Whether the heartbeatTime field is set. + */ + public boolean hasHeartbeatTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Timestamp for this heartbeat check.
+     * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + * + * @return The heartbeatTime. + */ + public com.google.protobuf.Timestamp getHeartbeatTime() { + if (heartbeatTimeBuilder_ == null) { + return heartbeatTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : heartbeatTime_; + } else { + return heartbeatTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Timestamp for this heartbeat check.
+     * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + */ + public Builder setHeartbeatTime(com.google.protobuf.Timestamp value) { + if (heartbeatTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + heartbeatTime_ = value; + } else { + heartbeatTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Timestamp for this heartbeat check.
+     * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + */ + public Builder setHeartbeatTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (heartbeatTimeBuilder_ == null) { + heartbeatTime_ = builderForValue.build(); + } else { + heartbeatTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Timestamp for this heartbeat check.
+     * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + */ + public Builder mergeHeartbeatTime(com.google.protobuf.Timestamp value) { + if (heartbeatTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && heartbeatTime_ != null + && heartbeatTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getHeartbeatTimeBuilder().mergeFrom(value); + } else { + heartbeatTime_ = value; + } + } else { + heartbeatTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Timestamp for this heartbeat check.
+     * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + */ + public Builder clearHeartbeatTime() { + bitField0_ = (bitField0_ & ~0x00000001); + heartbeatTime_ = null; + if (heartbeatTimeBuilder_ != null) { + heartbeatTimeBuilder_.dispose(); + heartbeatTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Timestamp for this heartbeat check.
+     * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getHeartbeatTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeartbeatTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Timestamp for this heartbeat check.
+     * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getHeartbeatTimeOrBuilder() { + if (heartbeatTimeBuilder_ != null) { + return heartbeatTimeBuilder_.getMessageOrBuilder(); + } else { + return heartbeatTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : heartbeatTime_; + } + } + /** + * + * + *
+     * Timestamp for this heartbeat check.
+     * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getHeartbeatTimeFieldBuilder() { + if (heartbeatTimeBuilder_ == null) { + heartbeatTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getHeartbeatTime(), getParentForChildren(), isClean()); + heartbeatTime_ = null; + } + return heartbeatTimeBuilder_; + } + + @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.executor.v1.HeartbeatRecord) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.HeartbeatRecord) + private static final com.google.spanner.executor.v1.HeartbeatRecord DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.HeartbeatRecord(); + } + + public static com.google.spanner.executor.v1.HeartbeatRecord getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeartbeatRecord 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.executor.v1.HeartbeatRecord getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/HeartbeatRecordOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/HeartbeatRecordOrBuilder.java new file mode 100644 index 00000000000..74d3fe25420 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/HeartbeatRecordOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface HeartbeatRecordOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.HeartbeatRecord) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Timestamp for this heartbeat check.
+   * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + * + * @return Whether the heartbeatTime field is set. + */ + boolean hasHeartbeatTime(); + /** + * + * + *
+   * Timestamp for this heartbeat check.
+   * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + * + * @return The heartbeatTime. + */ + com.google.protobuf.Timestamp getHeartbeatTime(); + /** + * + * + *
+   * Timestamp for this heartbeat check.
+   * 
+ * + * .google.protobuf.Timestamp heartbeat_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getHeartbeatTimeOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/KeyRange.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/KeyRange.java new file mode 100644 index 00000000000..fd29416a5d7 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/KeyRange.java @@ -0,0 +1,1385 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * KeyRange represents a range of rows in a table or index.
+ *
+ * A range has a start key and an end key. These keys can be open or
+ * closed, indicating if the range includes rows with that key.
+ *
+ * Keys are represented by "ValueList", where the ith value in the list
+ * corresponds to the ith component of the table or index primary key.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.KeyRange} + */ +public final class KeyRange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.KeyRange) + KeyRangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use KeyRange.newBuilder() to construct. + private KeyRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KeyRange() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KeyRange(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_KeyRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_KeyRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.KeyRange.class, + com.google.spanner.executor.v1.KeyRange.Builder.class); + } + + /** + * + * + *
+   * Type controls whether "start" and "limit" are open or closed. By default,
+   * "start" is closed, and "limit" is open.
+   * 
+ * + * Protobuf enum {@code google.spanner.executor.v1.KeyRange.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * "TYPE_UNSPECIFIED" is equivalent to "CLOSED_OPEN".
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * [start,limit]
+     * 
+ * + * CLOSED_CLOSED = 1; + */ + CLOSED_CLOSED(1), + /** + * + * + *
+     * [start,limit)
+     * 
+ * + * CLOSED_OPEN = 2; + */ + CLOSED_OPEN(2), + /** + * + * + *
+     * (start,limit]
+     * 
+ * + * OPEN_CLOSED = 3; + */ + OPEN_CLOSED(3), + /** + * + * + *
+     * (start,limit)
+     * 
+ * + * OPEN_OPEN = 4; + */ + OPEN_OPEN(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * "TYPE_UNSPECIFIED" is equivalent to "CLOSED_OPEN".
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * [start,limit]
+     * 
+ * + * CLOSED_CLOSED = 1; + */ + public static final int CLOSED_CLOSED_VALUE = 1; + /** + * + * + *
+     * [start,limit)
+     * 
+ * + * CLOSED_OPEN = 2; + */ + public static final int CLOSED_OPEN_VALUE = 2; + /** + * + * + *
+     * (start,limit]
+     * 
+ * + * OPEN_CLOSED = 3; + */ + public static final int OPEN_CLOSED_VALUE = 3; + /** + * + * + *
+     * (start,limit)
+     * 
+ * + * OPEN_OPEN = 4; + */ + public static final int OPEN_OPEN_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return CLOSED_CLOSED; + case 2: + return CLOSED_OPEN; + case 3: + return OPEN_CLOSED; + case 4: + return OPEN_OPEN; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.spanner.executor.v1.KeyRange.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.spanner.executor.v1.KeyRange.Type) + } + + private int bitField0_; + public static final int START_FIELD_NUMBER = 1; + private com.google.spanner.executor.v1.ValueList start_; + /** + * + * + *
+   * "start" and "limit" must have the same number of key parts,
+   * though they may name only a prefix of the table or index key.
+   * The start key of this KeyRange.
+   * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + * + * @return Whether the start field is set. + */ + @java.lang.Override + public boolean hasStart() { + return start_ != null; + } + /** + * + * + *
+   * "start" and "limit" must have the same number of key parts,
+   * though they may name only a prefix of the table or index key.
+   * The start key of this KeyRange.
+   * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + * + * @return The start. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueList getStart() { + return start_ == null ? com.google.spanner.executor.v1.ValueList.getDefaultInstance() : start_; + } + /** + * + * + *
+   * "start" and "limit" must have the same number of key parts,
+   * though they may name only a prefix of the table or index key.
+   * The start key of this KeyRange.
+   * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueListOrBuilder getStartOrBuilder() { + return start_ == null ? com.google.spanner.executor.v1.ValueList.getDefaultInstance() : start_; + } + + public static final int LIMIT_FIELD_NUMBER = 2; + private com.google.spanner.executor.v1.ValueList limit_; + /** + * + * + *
+   * The end key of this KeyRange.
+   * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + * + * @return Whether the limit field is set. + */ + @java.lang.Override + public boolean hasLimit() { + return limit_ != null; + } + /** + * + * + *
+   * The end key of this KeyRange.
+   * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + * + * @return The limit. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueList getLimit() { + return limit_ == null ? com.google.spanner.executor.v1.ValueList.getDefaultInstance() : limit_; + } + /** + * + * + *
+   * The end key of this KeyRange.
+   * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueListOrBuilder getLimitOrBuilder() { + return limit_ == null ? com.google.spanner.executor.v1.ValueList.getDefaultInstance() : limit_; + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_ = 0; + /** + * + * + *
+   * "start" and "limit" type for this KeyRange.
+   * 
+ * + * optional .google.spanner.executor.v1.KeyRange.Type type = 3; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * "start" and "limit" type for this KeyRange.
+   * 
+ * + * optional .google.spanner.executor.v1.KeyRange.Type type = 3; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * "start" and "limit" type for this KeyRange.
+   * 
+ * + * optional .google.spanner.executor.v1.KeyRange.Type type = 3; + * + * @return The type. + */ + @java.lang.Override + public com.google.spanner.executor.v1.KeyRange.Type getType() { + com.google.spanner.executor.v1.KeyRange.Type result = + com.google.spanner.executor.v1.KeyRange.Type.forNumber(type_); + return result == null ? com.google.spanner.executor.v1.KeyRange.Type.UNRECOGNIZED : result; + } + + 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 (start_ != null) { + output.writeMessage(1, getStart()); + } + if (limit_ != null) { + output.writeMessage(2, getLimit()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(3, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (start_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStart()); + } + if (limit_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLimit()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); + } + 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.executor.v1.KeyRange)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.KeyRange other = (com.google.spanner.executor.v1.KeyRange) obj; + + if (hasStart() != other.hasStart()) return false; + if (hasStart()) { + if (!getStart().equals(other.getStart())) return false; + } + if (hasLimit() != other.hasLimit()) return false; + if (hasLimit()) { + if (!getLimit().equals(other.getLimit())) return false; + } + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (type_ != other.type_) 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 (hasStart()) { + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + getStart().hashCode(); + } + if (hasLimit()) { + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit().hashCode(); + } + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.KeyRange parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.KeyRange 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.executor.v1.KeyRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.KeyRange 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.executor.v1.KeyRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.KeyRange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.KeyRange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.KeyRange 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.executor.v1.KeyRange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.KeyRange 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.executor.v1.KeyRange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.KeyRange 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.executor.v1.KeyRange 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; + } + /** + * + * + *
+   * KeyRange represents a range of rows in a table or index.
+   *
+   * A range has a start key and an end key. These keys can be open or
+   * closed, indicating if the range includes rows with that key.
+   *
+   * Keys are represented by "ValueList", where the ith value in the list
+   * corresponds to the ith component of the table or index primary key.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.KeyRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.KeyRange) + com.google.spanner.executor.v1.KeyRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_KeyRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_KeyRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.KeyRange.class, + com.google.spanner.executor.v1.KeyRange.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.KeyRange.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + start_ = null; + if (startBuilder_ != null) { + startBuilder_.dispose(); + startBuilder_ = null; + } + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_KeyRange_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.KeyRange getDefaultInstanceForType() { + return com.google.spanner.executor.v1.KeyRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.KeyRange build() { + com.google.spanner.executor.v1.KeyRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.KeyRange buildPartial() { + com.google.spanner.executor.v1.KeyRange result = + new com.google.spanner.executor.v1.KeyRange(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.KeyRange result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.start_ = startBuilder_ == null ? start_ : startBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.limit_ = limitBuilder_ == null ? limit_ : limitBuilder_.build(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_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.executor.v1.KeyRange) { + return mergeFrom((com.google.spanner.executor.v1.KeyRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.KeyRange other) { + if (other == com.google.spanner.executor.v1.KeyRange.getDefaultInstance()) return this; + if (other.hasStart()) { + mergeStart(other.getStart()); + } + if (other.hasLimit()) { + mergeLimit(other.getLimit()); + } + if (other.hasType()) { + setType(other.getType()); + } + 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: + { + input.readMessage(getStartFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getLimitFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + 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.spanner.executor.v1.ValueList start_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + startBuilder_; + /** + * + * + *
+     * "start" and "limit" must have the same number of key parts,
+     * though they may name only a prefix of the table or index key.
+     * The start key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + * + * @return Whether the start field is set. + */ + public boolean hasStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * "start" and "limit" must have the same number of key parts,
+     * though they may name only a prefix of the table or index key.
+     * The start key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + * + * @return The start. + */ + public com.google.spanner.executor.v1.ValueList getStart() { + if (startBuilder_ == null) { + return start_ == null + ? com.google.spanner.executor.v1.ValueList.getDefaultInstance() + : start_; + } else { + return startBuilder_.getMessage(); + } + } + /** + * + * + *
+     * "start" and "limit" must have the same number of key parts,
+     * though they may name only a prefix of the table or index key.
+     * The start key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + */ + public Builder setStart(com.google.spanner.executor.v1.ValueList value) { + if (startBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + start_ = value; + } else { + startBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * "start" and "limit" must have the same number of key parts,
+     * though they may name only a prefix of the table or index key.
+     * The start key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + */ + public Builder setStart(com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (startBuilder_ == null) { + start_ = builderForValue.build(); + } else { + startBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * "start" and "limit" must have the same number of key parts,
+     * though they may name only a prefix of the table or index key.
+     * The start key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + */ + public Builder mergeStart(com.google.spanner.executor.v1.ValueList value) { + if (startBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && start_ != null + && start_ != com.google.spanner.executor.v1.ValueList.getDefaultInstance()) { + getStartBuilder().mergeFrom(value); + } else { + start_ = value; + } + } else { + startBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * "start" and "limit" must have the same number of key parts,
+     * though they may name only a prefix of the table or index key.
+     * The start key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + */ + public Builder clearStart() { + bitField0_ = (bitField0_ & ~0x00000001); + start_ = null; + if (startBuilder_ != null) { + startBuilder_.dispose(); + startBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * "start" and "limit" must have the same number of key parts,
+     * though they may name only a prefix of the table or index key.
+     * The start key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + */ + public com.google.spanner.executor.v1.ValueList.Builder getStartBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * "start" and "limit" must have the same number of key parts,
+     * though they may name only a prefix of the table or index key.
+     * The start key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + */ + public com.google.spanner.executor.v1.ValueListOrBuilder getStartOrBuilder() { + if (startBuilder_ != null) { + return startBuilder_.getMessageOrBuilder(); + } else { + return start_ == null + ? com.google.spanner.executor.v1.ValueList.getDefaultInstance() + : start_; + } + } + /** + * + * + *
+     * "start" and "limit" must have the same number of key parts,
+     * though they may name only a prefix of the table or index key.
+     * The start key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + getStartFieldBuilder() { + if (startBuilder_ == null) { + startBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder>( + getStart(), getParentForChildren(), isClean()); + start_ = null; + } + return startBuilder_; + } + + private com.google.spanner.executor.v1.ValueList limit_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + limitBuilder_; + /** + * + * + *
+     * The end key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + * + * @return Whether the limit field is set. + */ + public boolean hasLimit() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The end key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + * + * @return The limit. + */ + public com.google.spanner.executor.v1.ValueList getLimit() { + if (limitBuilder_ == null) { + return limit_ == null + ? com.google.spanner.executor.v1.ValueList.getDefaultInstance() + : limit_; + } else { + return limitBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The end key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + */ + public Builder setLimit(com.google.spanner.executor.v1.ValueList value) { + if (limitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limit_ = value; + } else { + limitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The end key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + */ + public Builder setLimit(com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (limitBuilder_ == null) { + limit_ = builderForValue.build(); + } else { + limitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The end key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + */ + public Builder mergeLimit(com.google.spanner.executor.v1.ValueList value) { + if (limitBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && limit_ != null + && limit_ != com.google.spanner.executor.v1.ValueList.getDefaultInstance()) { + getLimitBuilder().mergeFrom(value); + } else { + limit_ = value; + } + } else { + limitBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The end key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000002); + limit_ = null; + if (limitBuilder_ != null) { + limitBuilder_.dispose(); + limitBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The end key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + */ + public com.google.spanner.executor.v1.ValueList.Builder getLimitBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLimitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The end key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + */ + public com.google.spanner.executor.v1.ValueListOrBuilder getLimitOrBuilder() { + if (limitBuilder_ != null) { + return limitBuilder_.getMessageOrBuilder(); + } else { + return limit_ == null + ? com.google.spanner.executor.v1.ValueList.getDefaultInstance() + : limit_; + } + } + /** + * + * + *
+     * The end key of this KeyRange.
+     * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + getLimitFieldBuilder() { + if (limitBuilder_ == null) { + limitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder>( + getLimit(), getParentForChildren(), isClean()); + limit_ = null; + } + return limitBuilder_; + } + + private int type_ = 0; + /** + * + * + *
+     * "start" and "limit" type for this KeyRange.
+     * 
+ * + * optional .google.spanner.executor.v1.KeyRange.Type type = 3; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * "start" and "limit" type for this KeyRange.
+     * 
+ * + * optional .google.spanner.executor.v1.KeyRange.Type type = 3; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * "start" and "limit" type for this KeyRange.
+     * 
+ * + * optional .google.spanner.executor.v1.KeyRange.Type type = 3; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * "start" and "limit" type for this KeyRange.
+     * 
+ * + * optional .google.spanner.executor.v1.KeyRange.Type type = 3; + * + * @return The type. + */ + @java.lang.Override + public com.google.spanner.executor.v1.KeyRange.Type getType() { + com.google.spanner.executor.v1.KeyRange.Type result = + com.google.spanner.executor.v1.KeyRange.Type.forNumber(type_); + return result == null ? com.google.spanner.executor.v1.KeyRange.Type.UNRECOGNIZED : result; + } + /** + * + * + *
+     * "start" and "limit" type for this KeyRange.
+     * 
+ * + * optional .google.spanner.executor.v1.KeyRange.Type type = 3; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.spanner.executor.v1.KeyRange.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * "start" and "limit" type for this KeyRange.
+     * 
+ * + * optional .google.spanner.executor.v1.KeyRange.Type type = 3; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000004); + type_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.KeyRange) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.KeyRange) + private static final com.google.spanner.executor.v1.KeyRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.KeyRange(); + } + + public static com.google.spanner.executor.v1.KeyRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KeyRange 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.executor.v1.KeyRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/KeyRangeOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/KeyRangeOrBuilder.java new file mode 100644 index 00000000000..7b06df2b79b --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/KeyRangeOrBuilder.java @@ -0,0 +1,138 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface KeyRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.KeyRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * "start" and "limit" must have the same number of key parts,
+   * though they may name only a prefix of the table or index key.
+   * The start key of this KeyRange.
+   * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + * + * @return Whether the start field is set. + */ + boolean hasStart(); + /** + * + * + *
+   * "start" and "limit" must have the same number of key parts,
+   * though they may name only a prefix of the table or index key.
+   * The start key of this KeyRange.
+   * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + * + * @return The start. + */ + com.google.spanner.executor.v1.ValueList getStart(); + /** + * + * + *
+   * "start" and "limit" must have the same number of key parts,
+   * though they may name only a prefix of the table or index key.
+   * The start key of this KeyRange.
+   * 
+ * + * .google.spanner.executor.v1.ValueList start = 1; + */ + com.google.spanner.executor.v1.ValueListOrBuilder getStartOrBuilder(); + + /** + * + * + *
+   * The end key of this KeyRange.
+   * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + * + * @return Whether the limit field is set. + */ + boolean hasLimit(); + /** + * + * + *
+   * The end key of this KeyRange.
+   * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + * + * @return The limit. + */ + com.google.spanner.executor.v1.ValueList getLimit(); + /** + * + * + *
+   * The end key of this KeyRange.
+   * 
+ * + * .google.spanner.executor.v1.ValueList limit = 2; + */ + com.google.spanner.executor.v1.ValueListOrBuilder getLimitOrBuilder(); + + /** + * + * + *
+   * "start" and "limit" type for this KeyRange.
+   * 
+ * + * optional .google.spanner.executor.v1.KeyRange.Type type = 3; + * + * @return Whether the type field is set. + */ + boolean hasType(); + /** + * + * + *
+   * "start" and "limit" type for this KeyRange.
+   * 
+ * + * optional .google.spanner.executor.v1.KeyRange.Type type = 3; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * "start" and "limit" type for this KeyRange.
+   * 
+ * + * optional .google.spanner.executor.v1.KeyRange.Type type = 3; + * + * @return The type. + */ + com.google.spanner.executor.v1.KeyRange.Type getType(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/KeySet.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/KeySet.java new file mode 100644 index 00000000000..42e3abdea5c --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/KeySet.java @@ -0,0 +1,1568 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * KeySet defines a collection of Spanner keys and/or key ranges. All
+ * the keys are expected to be in the same table. The keys need not be
+ * sorted in any particular way.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.KeySet} + */ +public final class KeySet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.KeySet) + KeySetOrBuilder { + private static final long serialVersionUID = 0L; + // Use KeySet.newBuilder() to construct. + private KeySet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KeySet() { + point_ = java.util.Collections.emptyList(); + range_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KeySet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_KeySet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_KeySet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.KeySet.class, + com.google.spanner.executor.v1.KeySet.Builder.class); + } + + public static final int POINT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List point_; + /** + * + * + *
+   * A list of specific keys. Entries in "keys" should have exactly as
+   * many elements as there are columns in the primary or index key
+   * with which this "KeySet" is used.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + @java.lang.Override + public java.util.List getPointList() { + return point_; + } + /** + * + * + *
+   * A list of specific keys. Entries in "keys" should have exactly as
+   * many elements as there are columns in the primary or index key
+   * with which this "KeySet" is used.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + @java.lang.Override + public java.util.List + getPointOrBuilderList() { + return point_; + } + /** + * + * + *
+   * A list of specific keys. Entries in "keys" should have exactly as
+   * many elements as there are columns in the primary or index key
+   * with which this "KeySet" is used.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + @java.lang.Override + public int getPointCount() { + return point_.size(); + } + /** + * + * + *
+   * A list of specific keys. Entries in "keys" should have exactly as
+   * many elements as there are columns in the primary or index key
+   * with which this "KeySet" is used.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueList getPoint(int index) { + return point_.get(index); + } + /** + * + * + *
+   * A list of specific keys. Entries in "keys" should have exactly as
+   * many elements as there are columns in the primary or index key
+   * with which this "KeySet" is used.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueListOrBuilder getPointOrBuilder(int index) { + return point_.get(index); + } + + public static final int RANGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List range_; + /** + * + * + *
+   * A list of key ranges.
+   * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + @java.lang.Override + public java.util.List getRangeList() { + return range_; + } + /** + * + * + *
+   * A list of key ranges.
+   * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + @java.lang.Override + public java.util.List + getRangeOrBuilderList() { + return range_; + } + /** + * + * + *
+   * A list of key ranges.
+   * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + @java.lang.Override + public int getRangeCount() { + return range_.size(); + } + /** + * + * + *
+   * A list of key ranges.
+   * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.KeyRange getRange(int index) { + return range_.get(index); + } + /** + * + * + *
+   * A list of key ranges.
+   * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.KeyRangeOrBuilder getRangeOrBuilder(int index) { + return range_.get(index); + } + + public static final int ALL_FIELD_NUMBER = 3; + private boolean all_ = false; + /** + * + * + *
+   * For convenience "all" can be set to "true" to indicate that this
+   * "KeySet" matches all keys in the table or index. Note that any keys
+   * specified in "keys" or "ranges" are only yielded once.
+   * 
+ * + * bool all = 3; + * + * @return The all. + */ + @java.lang.Override + public boolean getAll() { + return all_; + } + + 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 < point_.size(); i++) { + output.writeMessage(1, point_.get(i)); + } + for (int i = 0; i < range_.size(); i++) { + output.writeMessage(2, range_.get(i)); + } + if (all_ != false) { + output.writeBool(3, all_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < point_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, point_.get(i)); + } + for (int i = 0; i < range_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, range_.get(i)); + } + if (all_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, all_); + } + 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.executor.v1.KeySet)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.KeySet other = (com.google.spanner.executor.v1.KeySet) obj; + + if (!getPointList().equals(other.getPointList())) return false; + if (!getRangeList().equals(other.getRangeList())) return false; + if (getAll() != other.getAll()) 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 (getPointCount() > 0) { + hash = (37 * hash) + POINT_FIELD_NUMBER; + hash = (53 * hash) + getPointList().hashCode(); + } + if (getRangeCount() > 0) { + hash = (37 * hash) + RANGE_FIELD_NUMBER; + hash = (53 * hash) + getRangeList().hashCode(); + } + hash = (37 * hash) + ALL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAll()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.KeySet parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.KeySet 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.executor.v1.KeySet parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.KeySet 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.executor.v1.KeySet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.KeySet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.KeySet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.KeySet 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.executor.v1.KeySet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.KeySet 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.executor.v1.KeySet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.KeySet 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.executor.v1.KeySet 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; + } + /** + * + * + *
+   * KeySet defines a collection of Spanner keys and/or key ranges. All
+   * the keys are expected to be in the same table. The keys need not be
+   * sorted in any particular way.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.KeySet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.KeySet) + com.google.spanner.executor.v1.KeySetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_KeySet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_KeySet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.KeySet.class, + com.google.spanner.executor.v1.KeySet.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.KeySet.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (pointBuilder_ == null) { + point_ = java.util.Collections.emptyList(); + } else { + point_ = null; + pointBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (rangeBuilder_ == null) { + range_ = java.util.Collections.emptyList(); + } else { + range_ = null; + rangeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + all_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_KeySet_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.KeySet getDefaultInstanceForType() { + return com.google.spanner.executor.v1.KeySet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.KeySet build() { + com.google.spanner.executor.v1.KeySet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.KeySet buildPartial() { + com.google.spanner.executor.v1.KeySet result = + new com.google.spanner.executor.v1.KeySet(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.executor.v1.KeySet result) { + if (pointBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + point_ = java.util.Collections.unmodifiableList(point_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.point_ = point_; + } else { + result.point_ = pointBuilder_.build(); + } + if (rangeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + range_ = java.util.Collections.unmodifiableList(range_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.range_ = range_; + } else { + result.range_ = rangeBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.KeySet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.all_ = all_; + } + } + + @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.executor.v1.KeySet) { + return mergeFrom((com.google.spanner.executor.v1.KeySet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.KeySet other) { + if (other == com.google.spanner.executor.v1.KeySet.getDefaultInstance()) return this; + if (pointBuilder_ == null) { + if (!other.point_.isEmpty()) { + if (point_.isEmpty()) { + point_ = other.point_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePointIsMutable(); + point_.addAll(other.point_); + } + onChanged(); + } + } else { + if (!other.point_.isEmpty()) { + if (pointBuilder_.isEmpty()) { + pointBuilder_.dispose(); + pointBuilder_ = null; + point_ = other.point_; + bitField0_ = (bitField0_ & ~0x00000001); + pointBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPointFieldBuilder() + : null; + } else { + pointBuilder_.addAllMessages(other.point_); + } + } + } + if (rangeBuilder_ == null) { + if (!other.range_.isEmpty()) { + if (range_.isEmpty()) { + range_ = other.range_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRangeIsMutable(); + range_.addAll(other.range_); + } + onChanged(); + } + } else { + if (!other.range_.isEmpty()) { + if (rangeBuilder_.isEmpty()) { + rangeBuilder_.dispose(); + rangeBuilder_ = null; + range_ = other.range_; + bitField0_ = (bitField0_ & ~0x00000002); + rangeBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRangeFieldBuilder() + : null; + } else { + rangeBuilder_.addAllMessages(other.range_); + } + } + } + if (other.getAll() != false) { + setAll(other.getAll()); + } + 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.executor.v1.ValueList m = + input.readMessage( + com.google.spanner.executor.v1.ValueList.parser(), extensionRegistry); + if (pointBuilder_ == null) { + ensurePointIsMutable(); + point_.add(m); + } else { + pointBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.spanner.executor.v1.KeyRange m = + input.readMessage( + com.google.spanner.executor.v1.KeyRange.parser(), extensionRegistry); + if (rangeBuilder_ == null) { + ensureRangeIsMutable(); + range_.add(m); + } else { + rangeBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + all_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + 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 point_ = + java.util.Collections.emptyList(); + + private void ensurePointIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + point_ = new java.util.ArrayList(point_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + pointBuilder_; + + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public java.util.List getPointList() { + if (pointBuilder_ == null) { + return java.util.Collections.unmodifiableList(point_); + } else { + return pointBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public int getPointCount() { + if (pointBuilder_ == null) { + return point_.size(); + } else { + return pointBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public com.google.spanner.executor.v1.ValueList getPoint(int index) { + if (pointBuilder_ == null) { + return point_.get(index); + } else { + return pointBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public Builder setPoint(int index, com.google.spanner.executor.v1.ValueList value) { + if (pointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePointIsMutable(); + point_.set(index, value); + onChanged(); + } else { + pointBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public Builder setPoint( + int index, com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (pointBuilder_ == null) { + ensurePointIsMutable(); + point_.set(index, builderForValue.build()); + onChanged(); + } else { + pointBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public Builder addPoint(com.google.spanner.executor.v1.ValueList value) { + if (pointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePointIsMutable(); + point_.add(value); + onChanged(); + } else { + pointBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public Builder addPoint(int index, com.google.spanner.executor.v1.ValueList value) { + if (pointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePointIsMutable(); + point_.add(index, value); + onChanged(); + } else { + pointBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public Builder addPoint(com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (pointBuilder_ == null) { + ensurePointIsMutable(); + point_.add(builderForValue.build()); + onChanged(); + } else { + pointBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public Builder addPoint( + int index, com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (pointBuilder_ == null) { + ensurePointIsMutable(); + point_.add(index, builderForValue.build()); + onChanged(); + } else { + pointBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public Builder addAllPoint( + java.lang.Iterable values) { + if (pointBuilder_ == null) { + ensurePointIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, point_); + onChanged(); + } else { + pointBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public Builder clearPoint() { + if (pointBuilder_ == null) { + point_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pointBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public Builder removePoint(int index) { + if (pointBuilder_ == null) { + ensurePointIsMutable(); + point_.remove(index); + onChanged(); + } else { + pointBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public com.google.spanner.executor.v1.ValueList.Builder getPointBuilder(int index) { + return getPointFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public com.google.spanner.executor.v1.ValueListOrBuilder getPointOrBuilder(int index) { + if (pointBuilder_ == null) { + return point_.get(index); + } else { + return pointBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public java.util.List + getPointOrBuilderList() { + if (pointBuilder_ != null) { + return pointBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(point_); + } + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public com.google.spanner.executor.v1.ValueList.Builder addPointBuilder() { + return getPointFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.ValueList.getDefaultInstance()); + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public com.google.spanner.executor.v1.ValueList.Builder addPointBuilder(int index) { + return getPointFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.ValueList.getDefaultInstance()); + } + /** + * + * + *
+     * A list of specific keys. Entries in "keys" should have exactly as
+     * many elements as there are columns in the primary or index key
+     * with which this "KeySet" is used.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + public java.util.List getPointBuilderList() { + return getPointFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + getPointFieldBuilder() { + if (pointBuilder_ == null) { + pointBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder>( + point_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + point_ = null; + } + return pointBuilder_; + } + + private java.util.List range_ = + java.util.Collections.emptyList(); + + private void ensureRangeIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + range_ = new java.util.ArrayList(range_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.KeyRange, + com.google.spanner.executor.v1.KeyRange.Builder, + com.google.spanner.executor.v1.KeyRangeOrBuilder> + rangeBuilder_; + + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public java.util.List getRangeList() { + if (rangeBuilder_ == null) { + return java.util.Collections.unmodifiableList(range_); + } else { + return rangeBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public int getRangeCount() { + if (rangeBuilder_ == null) { + return range_.size(); + } else { + return rangeBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public com.google.spanner.executor.v1.KeyRange getRange(int index) { + if (rangeBuilder_ == null) { + return range_.get(index); + } else { + return rangeBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public Builder setRange(int index, com.google.spanner.executor.v1.KeyRange value) { + if (rangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangeIsMutable(); + range_.set(index, value); + onChanged(); + } else { + rangeBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public Builder setRange( + int index, com.google.spanner.executor.v1.KeyRange.Builder builderForValue) { + if (rangeBuilder_ == null) { + ensureRangeIsMutable(); + range_.set(index, builderForValue.build()); + onChanged(); + } else { + rangeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public Builder addRange(com.google.spanner.executor.v1.KeyRange value) { + if (rangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangeIsMutable(); + range_.add(value); + onChanged(); + } else { + rangeBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public Builder addRange(int index, com.google.spanner.executor.v1.KeyRange value) { + if (rangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangeIsMutable(); + range_.add(index, value); + onChanged(); + } else { + rangeBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public Builder addRange(com.google.spanner.executor.v1.KeyRange.Builder builderForValue) { + if (rangeBuilder_ == null) { + ensureRangeIsMutable(); + range_.add(builderForValue.build()); + onChanged(); + } else { + rangeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public Builder addRange( + int index, com.google.spanner.executor.v1.KeyRange.Builder builderForValue) { + if (rangeBuilder_ == null) { + ensureRangeIsMutable(); + range_.add(index, builderForValue.build()); + onChanged(); + } else { + rangeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public Builder addAllRange( + java.lang.Iterable values) { + if (rangeBuilder_ == null) { + ensureRangeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, range_); + onChanged(); + } else { + rangeBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public Builder clearRange() { + if (rangeBuilder_ == null) { + range_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + rangeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public Builder removeRange(int index) { + if (rangeBuilder_ == null) { + ensureRangeIsMutable(); + range_.remove(index); + onChanged(); + } else { + rangeBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public com.google.spanner.executor.v1.KeyRange.Builder getRangeBuilder(int index) { + return getRangeFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public com.google.spanner.executor.v1.KeyRangeOrBuilder getRangeOrBuilder(int index) { + if (rangeBuilder_ == null) { + return range_.get(index); + } else { + return rangeBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public java.util.List + getRangeOrBuilderList() { + if (rangeBuilder_ != null) { + return rangeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(range_); + } + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public com.google.spanner.executor.v1.KeyRange.Builder addRangeBuilder() { + return getRangeFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.KeyRange.getDefaultInstance()); + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public com.google.spanner.executor.v1.KeyRange.Builder addRangeBuilder(int index) { + return getRangeFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.KeyRange.getDefaultInstance()); + } + /** + * + * + *
+     * A list of key ranges.
+     * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + public java.util.List getRangeBuilderList() { + return getRangeFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.KeyRange, + com.google.spanner.executor.v1.KeyRange.Builder, + com.google.spanner.executor.v1.KeyRangeOrBuilder> + getRangeFieldBuilder() { + if (rangeBuilder_ == null) { + rangeBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.KeyRange, + com.google.spanner.executor.v1.KeyRange.Builder, + com.google.spanner.executor.v1.KeyRangeOrBuilder>( + range_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + range_ = null; + } + return rangeBuilder_; + } + + private boolean all_; + /** + * + * + *
+     * For convenience "all" can be set to "true" to indicate that this
+     * "KeySet" matches all keys in the table or index. Note that any keys
+     * specified in "keys" or "ranges" are only yielded once.
+     * 
+ * + * bool all = 3; + * + * @return The all. + */ + @java.lang.Override + public boolean getAll() { + return all_; + } + /** + * + * + *
+     * For convenience "all" can be set to "true" to indicate that this
+     * "KeySet" matches all keys in the table or index. Note that any keys
+     * specified in "keys" or "ranges" are only yielded once.
+     * 
+ * + * bool all = 3; + * + * @param value The all to set. + * @return This builder for chaining. + */ + public Builder setAll(boolean value) { + + all_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * For convenience "all" can be set to "true" to indicate that this
+     * "KeySet" matches all keys in the table or index. Note that any keys
+     * specified in "keys" or "ranges" are only yielded once.
+     * 
+ * + * bool all = 3; + * + * @return This builder for chaining. + */ + public Builder clearAll() { + bitField0_ = (bitField0_ & ~0x00000004); + all_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.KeySet) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.KeySet) + private static final com.google.spanner.executor.v1.KeySet DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.KeySet(); + } + + public static com.google.spanner.executor.v1.KeySet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KeySet 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.executor.v1.KeySet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/KeySetOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/KeySetOrBuilder.java new file mode 100644 index 00000000000..6e8533c5469 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/KeySetOrBuilder.java @@ -0,0 +1,154 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface KeySetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.KeySet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of specific keys. Entries in "keys" should have exactly as
+   * many elements as there are columns in the primary or index key
+   * with which this "KeySet" is used.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + java.util.List getPointList(); + /** + * + * + *
+   * A list of specific keys. Entries in "keys" should have exactly as
+   * many elements as there are columns in the primary or index key
+   * with which this "KeySet" is used.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + com.google.spanner.executor.v1.ValueList getPoint(int index); + /** + * + * + *
+   * A list of specific keys. Entries in "keys" should have exactly as
+   * many elements as there are columns in the primary or index key
+   * with which this "KeySet" is used.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + int getPointCount(); + /** + * + * + *
+   * A list of specific keys. Entries in "keys" should have exactly as
+   * many elements as there are columns in the primary or index key
+   * with which this "KeySet" is used.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + java.util.List + getPointOrBuilderList(); + /** + * + * + *
+   * A list of specific keys. Entries in "keys" should have exactly as
+   * many elements as there are columns in the primary or index key
+   * with which this "KeySet" is used.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList point = 1; + */ + com.google.spanner.executor.v1.ValueListOrBuilder getPointOrBuilder(int index); + + /** + * + * + *
+   * A list of key ranges.
+   * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + java.util.List getRangeList(); + /** + * + * + *
+   * A list of key ranges.
+   * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + com.google.spanner.executor.v1.KeyRange getRange(int index); + /** + * + * + *
+   * A list of key ranges.
+   * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + int getRangeCount(); + /** + * + * + *
+   * A list of key ranges.
+   * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + java.util.List + getRangeOrBuilderList(); + /** + * + * + *
+   * A list of key ranges.
+   * 
+ * + * repeated .google.spanner.executor.v1.KeyRange range = 2; + */ + com.google.spanner.executor.v1.KeyRangeOrBuilder getRangeOrBuilder(int index); + + /** + * + * + *
+   * For convenience "all" can be set to "true" to indicate that this
+   * "KeySet" matches all keys in the table or index. Note that any keys
+   * specified in "keys" or "ranges" are only yielded once.
+   * 
+ * + * bool all = 3; + * + * @return The all. + */ + boolean getAll(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudBackupOperationsAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudBackupOperationsAction.java new file mode 100644 index 00000000000..ab8e30e959a --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudBackupOperationsAction.java @@ -0,0 +1,1324 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that lists Cloud Spanner database backup operations.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ListCloudBackupOperationsAction} + */ +public final class ListCloudBackupOperationsAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ListCloudBackupOperationsAction) + ListCloudBackupOperationsActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCloudBackupOperationsAction.newBuilder() to construct. + private ListCloudBackupOperationsAction( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCloudBackupOperationsAction() { + projectId_ = ""; + instanceId_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCloudBackupOperationsAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ListCloudBackupOperationsAction.class, + com.google.spanner.executor.v1.ListCloudBackupOperationsAction.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path) to list backup operations from,
+   * e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path) to list backup operations from,
+   * e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer backup.proto.ListBackupOperationsRequest for detail.
+   * 
+ * + * string filter = 3; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer backup.proto.ListBackupOperationsRequest for detail.
+   * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_ = 0; + /** + * + * + *
+   * Number of backups to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListBackupOperationsResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListBackupOperationsResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + 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.executor.v1.ListCloudBackupOperationsAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ListCloudBackupOperationsAction other = + (com.google.spanner.executor.v1.ListCloudBackupOperationsAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ListCloudBackupOperationsAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudBackupOperationsAction 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.executor.v1.ListCloudBackupOperationsAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudBackupOperationsAction 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.executor.v1.ListCloudBackupOperationsAction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudBackupOperationsAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ListCloudBackupOperationsAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudBackupOperationsAction 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.executor.v1.ListCloudBackupOperationsAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudBackupOperationsAction 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.executor.v1.ListCloudBackupOperationsAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudBackupOperationsAction 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.executor.v1.ListCloudBackupOperationsAction 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; + } + /** + * + * + *
+   * Action that lists Cloud Spanner database backup operations.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ListCloudBackupOperationsAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ListCloudBackupOperationsAction) + com.google.spanner.executor.v1.ListCloudBackupOperationsActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ListCloudBackupOperationsAction.class, + com.google.spanner.executor.v1.ListCloudBackupOperationsAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ListCloudBackupOperationsAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudBackupOperationsAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupOperationsAction + getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ListCloudBackupOperationsAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupOperationsAction build() { + com.google.spanner.executor.v1.ListCloudBackupOperationsAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupOperationsAction buildPartial() { + com.google.spanner.executor.v1.ListCloudBackupOperationsAction result = + new com.google.spanner.executor.v1.ListCloudBackupOperationsAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.executor.v1.ListCloudBackupOperationsAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @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.executor.v1.ListCloudBackupOperationsAction) { + return mergeFrom((com.google.spanner.executor.v1.ListCloudBackupOperationsAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ListCloudBackupOperationsAction other) { + if (other + == com.google.spanner.executor.v1.ListCloudBackupOperationsAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000010; + onChanged(); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path) to list backup operations from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) to list backup operations from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) to list backup operations from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) to list backup operations from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) to list backup operations from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer backup.proto.ListBackupOperationsRequest for detail.
+     * 
+ * + * string filter = 3; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer backup.proto.ListBackupOperationsRequest for detail.
+     * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer backup.proto.ListBackupOperationsRequest for detail.
+     * 
+ * + * string filter = 3; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer backup.proto.ListBackupOperationsRequest for detail.
+     * 
+ * + * string filter = 3; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer backup.proto.ListBackupOperationsRequest for detail.
+     * 
+ * + * string filter = 3; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Number of backups to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Number of backups to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 4; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of backups to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000008); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListBackupOperationsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListBackupOperationsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListBackupOperationsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListBackupOperationsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListBackupOperationsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.ListCloudBackupOperationsAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ListCloudBackupOperationsAction) + private static final com.google.spanner.executor.v1.ListCloudBackupOperationsAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ListCloudBackupOperationsAction(); + } + + public static com.google.spanner.executor.v1.ListCloudBackupOperationsAction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCloudBackupOperationsAction 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.executor.v1.ListCloudBackupOperationsAction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudBackupOperationsActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudBackupOperationsActionOrBuilder.java new file mode 100644 index 00000000000..13716f3b9d3 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudBackupOperationsActionOrBuilder.java @@ -0,0 +1,153 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ListCloudBackupOperationsActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ListCloudBackupOperationsAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path) to list backup operations from,
+   * e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path) to list backup operations from,
+   * e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer backup.proto.ListBackupOperationsRequest for detail.
+   * 
+ * + * string filter = 3; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer backup.proto.ListBackupOperationsRequest for detail.
+   * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Number of backups to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListBackupOperationsResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListBackupOperationsResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudBackupsAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudBackupsAction.java new file mode 100644 index 00000000000..48a3c038bde --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudBackupsAction.java @@ -0,0 +1,1303 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that lists Cloud Spanner database backups.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ListCloudBackupsAction} + */ +public final class ListCloudBackupsAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ListCloudBackupsAction) + ListCloudBackupsActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCloudBackupsAction.newBuilder() to construct. + private ListCloudBackupsAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCloudBackupsAction() { + projectId_ = ""; + instanceId_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCloudBackupsAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudBackupsAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudBackupsAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ListCloudBackupsAction.class, + com.google.spanner.executor.v1.ListCloudBackupsAction.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path) to list backups from, e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path) to list backups from, e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * A filter expression that filters backups listed in the response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer backup.proto.ListBackupsRequest for detail.
+   * 
+ * + * string filter = 3; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * A filter expression that filters backups listed in the response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer backup.proto.ListBackupsRequest for detail.
+   * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_ = 0; + /** + * + * + *
+   * Number of backups to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListBackupsResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListBackupsResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + 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.executor.v1.ListCloudBackupsAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ListCloudBackupsAction other = + (com.google.spanner.executor.v1.ListCloudBackupsAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ListCloudBackupsAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudBackupsAction 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.executor.v1.ListCloudBackupsAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudBackupsAction 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.executor.v1.ListCloudBackupsAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudBackupsAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ListCloudBackupsAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudBackupsAction 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.executor.v1.ListCloudBackupsAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudBackupsAction 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.executor.v1.ListCloudBackupsAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudBackupsAction 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.executor.v1.ListCloudBackupsAction 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; + } + /** + * + * + *
+   * Action that lists Cloud Spanner database backups.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ListCloudBackupsAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ListCloudBackupsAction) + com.google.spanner.executor.v1.ListCloudBackupsActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudBackupsAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudBackupsAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ListCloudBackupsAction.class, + com.google.spanner.executor.v1.ListCloudBackupsAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ListCloudBackupsAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudBackupsAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupsAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ListCloudBackupsAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupsAction build() { + com.google.spanner.executor.v1.ListCloudBackupsAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudBackupsAction buildPartial() { + com.google.spanner.executor.v1.ListCloudBackupsAction result = + new com.google.spanner.executor.v1.ListCloudBackupsAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.ListCloudBackupsAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @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.executor.v1.ListCloudBackupsAction) { + return mergeFrom((com.google.spanner.executor.v1.ListCloudBackupsAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ListCloudBackupsAction other) { + if (other == com.google.spanner.executor.v1.ListCloudBackupsAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000010; + onChanged(); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path) to list backups from, e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) to list backups from, e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) to list backups from, e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) to list backups from, e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) to list backups from, e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * A filter expression that filters backups listed in the response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer backup.proto.ListBackupsRequest for detail.
+     * 
+ * + * string filter = 3; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A filter expression that filters backups listed in the response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer backup.proto.ListBackupsRequest for detail.
+     * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A filter expression that filters backups listed in the response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer backup.proto.ListBackupsRequest for detail.
+     * 
+ * + * string filter = 3; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A filter expression that filters backups listed in the response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer backup.proto.ListBackupsRequest for detail.
+     * 
+ * + * string filter = 3; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A filter expression that filters backups listed in the response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer backup.proto.ListBackupsRequest for detail.
+     * 
+ * + * string filter = 3; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Number of backups to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Number of backups to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 4; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of backups to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000008); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListBackupsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListBackupsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListBackupsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListBackupsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListBackupsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.ListCloudBackupsAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ListCloudBackupsAction) + private static final com.google.spanner.executor.v1.ListCloudBackupsAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ListCloudBackupsAction(); + } + + public static com.google.spanner.executor.v1.ListCloudBackupsAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCloudBackupsAction 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.executor.v1.ListCloudBackupsAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudBackupsActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudBackupsActionOrBuilder.java new file mode 100644 index 00000000000..ebdff68355e --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudBackupsActionOrBuilder.java @@ -0,0 +1,149 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ListCloudBackupsActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ListCloudBackupsAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path) to list backups from, e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path) to list backups from, e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * A filter expression that filters backups listed in the response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer backup.proto.ListBackupsRequest for detail.
+   * 
+ * + * string filter = 3; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * A filter expression that filters backups listed in the response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer backup.proto.ListBackupsRequest for detail.
+   * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Number of backups to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListBackupsResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListBackupsResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudDatabaseOperationsAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudDatabaseOperationsAction.java new file mode 100644 index 00000000000..bd8e1a4a53e --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudDatabaseOperationsAction.java @@ -0,0 +1,1332 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that lists Cloud Spanner database operations.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ListCloudDatabaseOperationsAction} + */ +public final class ListCloudDatabaseOperationsAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ListCloudDatabaseOperationsAction) + ListCloudDatabaseOperationsActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCloudDatabaseOperationsAction.newBuilder() to construct. + private ListCloudDatabaseOperationsAction( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCloudDatabaseOperationsAction() { + projectId_ = ""; + instanceId_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCloudDatabaseOperationsAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.class, + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path) to list database operations from,
+   * e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path) to list database operations from,
+   * e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer spanner_database_admin.proto.ListDatabaseOperationsRequest for
+   * detail.
+   * 
+ * + * string filter = 3; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer spanner_database_admin.proto.ListDatabaseOperationsRequest for
+   * detail.
+   * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_ = 0; + /** + * + * + *
+   * Number of databases to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListDatabaseOperationsResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListDatabaseOperationsResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + 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.executor.v1.ListCloudDatabaseOperationsAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction other = + (com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction 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.executor.v1.ListCloudDatabaseOperationsAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction 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.executor.v1.ListCloudDatabaseOperationsAction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction 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.executor.v1.ListCloudDatabaseOperationsAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction 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.executor.v1.ListCloudDatabaseOperationsAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction 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.executor.v1.ListCloudDatabaseOperationsAction 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; + } + /** + * + * + *
+   * Action that lists Cloud Spanner database operations.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ListCloudDatabaseOperationsAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ListCloudDatabaseOperationsAction) + com.google.spanner.executor.v1.ListCloudDatabaseOperationsActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.class, + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudDatabaseOperationsAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction + getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction build() { + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction buildPartial() { + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction result = + new com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @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.executor.v1.ListCloudDatabaseOperationsAction) { + return mergeFrom((com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction other) { + if (other + == com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000010; + onChanged(); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path) to list database operations from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) to list database operations from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) to list database operations from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) to list database operations from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) to list database operations from,
+     * e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer spanner_database_admin.proto.ListDatabaseOperationsRequest for
+     * detail.
+     * 
+ * + * string filter = 3; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer spanner_database_admin.proto.ListDatabaseOperationsRequest for
+     * detail.
+     * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer spanner_database_admin.proto.ListDatabaseOperationsRequest for
+     * detail.
+     * 
+ * + * string filter = 3; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer spanner_database_admin.proto.ListDatabaseOperationsRequest for
+     * detail.
+     * 
+ * + * string filter = 3; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer spanner_database_admin.proto.ListDatabaseOperationsRequest for
+     * detail.
+     * 
+ * + * string filter = 3; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Number of databases to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Number of databases to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 4; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of databases to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000008); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListDatabaseOperationsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListDatabaseOperationsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListDatabaseOperationsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListDatabaseOperationsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListDatabaseOperationsResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 5; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.ListCloudDatabaseOperationsAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ListCloudDatabaseOperationsAction) + private static final com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction(); + } + + public static com.google.spanner.executor.v1.ListCloudDatabaseOperationsAction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCloudDatabaseOperationsAction 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.executor.v1.ListCloudDatabaseOperationsAction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudDatabaseOperationsActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudDatabaseOperationsActionOrBuilder.java new file mode 100644 index 00000000000..fc74a4fb86a --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudDatabaseOperationsActionOrBuilder.java @@ -0,0 +1,155 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ListCloudDatabaseOperationsActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ListCloudDatabaseOperationsAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path) to list database operations from,
+   * e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path) to list database operations from,
+   * e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer spanner_database_admin.proto.ListDatabaseOperationsRequest for
+   * detail.
+   * 
+ * + * string filter = 3; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer spanner_database_admin.proto.ListDatabaseOperationsRequest for
+   * detail.
+   * 
+ * + * string filter = 3; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Number of databases to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListDatabaseOperationsResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListDatabaseOperationsResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudDatabasesAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudDatabasesAction.java new file mode 100644 index 00000000000..73f4de7ed68 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudDatabasesAction.java @@ -0,0 +1,1100 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that lists Cloud Spanner databases.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ListCloudDatabasesAction} + */ +public final class ListCloudDatabasesAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ListCloudDatabasesAction) + ListCloudDatabasesActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCloudDatabasesAction.newBuilder() to construct. + private ListCloudDatabasesAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCloudDatabasesAction() { + projectId_ = ""; + instanceId_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCloudDatabasesAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ListCloudDatabasesAction.class, + com.google.spanner.executor.v1.ListCloudDatabasesAction.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path) to list databases from, e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path) to list databases from, e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * Number of databases to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListDatabasesResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListDatabasesResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + 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.executor.v1.ListCloudDatabasesAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ListCloudDatabasesAction other = + (com.google.spanner.executor.v1.ListCloudDatabasesAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ListCloudDatabasesAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudDatabasesAction 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.executor.v1.ListCloudDatabasesAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudDatabasesAction 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.executor.v1.ListCloudDatabasesAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudDatabasesAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ListCloudDatabasesAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudDatabasesAction 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.executor.v1.ListCloudDatabasesAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudDatabasesAction 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.executor.v1.ListCloudDatabasesAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudDatabasesAction 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.executor.v1.ListCloudDatabasesAction 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; + } + /** + * + * + *
+   * Action that lists Cloud Spanner databases.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ListCloudDatabasesAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ListCloudDatabasesAction) + com.google.spanner.executor.v1.ListCloudDatabasesActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ListCloudDatabasesAction.class, + com.google.spanner.executor.v1.ListCloudDatabasesAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ListCloudDatabasesAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudDatabasesAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabasesAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ListCloudDatabasesAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabasesAction build() { + com.google.spanner.executor.v1.ListCloudDatabasesAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudDatabasesAction buildPartial() { + com.google.spanner.executor.v1.ListCloudDatabasesAction result = + new com.google.spanner.executor.v1.ListCloudDatabasesAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.ListCloudDatabasesAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @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.executor.v1.ListCloudDatabasesAction) { + return mergeFrom((com.google.spanner.executor.v1.ListCloudDatabasesAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ListCloudDatabasesAction other) { + if (other == com.google.spanner.executor.v1.ListCloudDatabasesAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + 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 projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path) to list databases from, e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) to list databases from, e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) to list databases from, e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) to list databases from, e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) to list databases from, e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Number of databases to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Number of databases to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of databases to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListDatabasesResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListDatabasesResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListDatabasesResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListDatabasesResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListDatabasesResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.ListCloudDatabasesAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ListCloudDatabasesAction) + private static final com.google.spanner.executor.v1.ListCloudDatabasesAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ListCloudDatabasesAction(); + } + + public static com.google.spanner.executor.v1.ListCloudDatabasesAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCloudDatabasesAction 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.executor.v1.ListCloudDatabasesAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudDatabasesActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudDatabasesActionOrBuilder.java new file mode 100644 index 00000000000..95e13ccb1c3 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudDatabasesActionOrBuilder.java @@ -0,0 +1,118 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ListCloudDatabasesActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ListCloudDatabasesAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path) to list databases from, e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path) to list databases from, e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Number of databases to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListDatabasesResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListDatabasesResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudInstanceConfigsAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudInstanceConfigsAction.java new file mode 100644 index 00000000000..980fbf4beaf --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudInstanceConfigsAction.java @@ -0,0 +1,994 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that lists user instance configs.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ListCloudInstanceConfigsAction} + */ +public final class ListCloudInstanceConfigsAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ListCloudInstanceConfigsAction) + ListCloudInstanceConfigsActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCloudInstanceConfigsAction.newBuilder() to construct. + private ListCloudInstanceConfigsAction( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCloudInstanceConfigsAction() { + projectId_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCloudInstanceConfigsAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.class, + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.Builder.class); + } + + private int bitField0_; + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Number of instance configs to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * optional int32 page_size = 2; + * + * @return Whether the pageSize field is set. + */ + @java.lang.Override + public boolean hasPageSize() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Number of instance configs to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * optional int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListInstanceConfigsResponse to the same "parent".
+   * 
+ * + * optional string page_token = 3; + * + * @return Whether the pageToken field is set. + */ + @java.lang.Override + public boolean hasPageToken() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListInstanceConfigsResponse to the same "parent".
+   * 
+ * + * optional string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListInstanceConfigsResponse to the same "parent".
+   * 
+ * + * optional string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(2, pageSize_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + 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.executor.v1.ListCloudInstanceConfigsAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction other = + (com.google.spanner.executor.v1.ListCloudInstanceConfigsAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (hasPageSize() != other.hasPageSize()) return false; + if (hasPageSize()) { + if (getPageSize() != other.getPageSize()) return false; + } + if (hasPageToken() != other.hasPageToken()) return false; + if (hasPageToken()) { + if (!getPageToken().equals(other.getPageToken())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + if (hasPageSize()) { + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + } + if (hasPageToken()) { + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ListCloudInstanceConfigsAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudInstanceConfigsAction 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.executor.v1.ListCloudInstanceConfigsAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudInstanceConfigsAction 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.executor.v1.ListCloudInstanceConfigsAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudInstanceConfigsAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ListCloudInstanceConfigsAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudInstanceConfigsAction 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.executor.v1.ListCloudInstanceConfigsAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudInstanceConfigsAction 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.executor.v1.ListCloudInstanceConfigsAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudInstanceConfigsAction 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.executor.v1.ListCloudInstanceConfigsAction 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; + } + /** + * + * + *
+   * Action that lists user instance configs.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ListCloudInstanceConfigsAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ListCloudInstanceConfigsAction) + com.google.spanner.executor.v1.ListCloudInstanceConfigsActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.class, + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudInstanceConfigsAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstanceConfigsAction + getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstanceConfigsAction build() { + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstanceConfigsAction buildPartial() { + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction result = + new com.google.spanner.executor.v1.ListCloudInstanceConfigsAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.executor.v1.ListCloudInstanceConfigsAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_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.executor.v1.ListCloudInstanceConfigsAction) { + return mergeFrom((com.google.spanner.executor.v1.ListCloudInstanceConfigsAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ListCloudInstanceConfigsAction other) { + if (other + == com.google.spanner.executor.v1.ListCloudInstanceConfigsAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPageSize()) { + setPageSize(other.getPageSize()); + } + if (other.hasPageToken()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + 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 java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Number of instance configs to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * optional int32 page_size = 2; + * + * @return Whether the pageSize field is set. + */ + @java.lang.Override + public boolean hasPageSize() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Number of instance configs to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * optional int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Number of instance configs to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * optional int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of instance configs to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * optional int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListInstanceConfigsResponse to the same "parent".
+     * 
+ * + * optional string page_token = 3; + * + * @return Whether the pageToken field is set. + */ + public boolean hasPageToken() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListInstanceConfigsResponse to the same "parent".
+     * 
+ * + * optional string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListInstanceConfigsResponse to the same "parent".
+     * 
+ * + * optional string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListInstanceConfigsResponse to the same "parent".
+     * 
+ * + * optional string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListInstanceConfigsResponse to the same "parent".
+     * 
+ * + * optional string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListInstanceConfigsResponse to the same "parent".
+     * 
+ * + * optional string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.ListCloudInstanceConfigsAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ListCloudInstanceConfigsAction) + private static final com.google.spanner.executor.v1.ListCloudInstanceConfigsAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ListCloudInstanceConfigsAction(); + } + + public static com.google.spanner.executor.v1.ListCloudInstanceConfigsAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCloudInstanceConfigsAction 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.executor.v1.ListCloudInstanceConfigsAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudInstanceConfigsActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudInstanceConfigsActionOrBuilder.java new file mode 100644 index 00000000000..410273d191a --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudInstanceConfigsActionOrBuilder.java @@ -0,0 +1,117 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ListCloudInstanceConfigsActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ListCloudInstanceConfigsAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Number of instance configs to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * optional int32 page_size = 2; + * + * @return Whether the pageSize field is set. + */ + boolean hasPageSize(); + /** + * + * + *
+   * Number of instance configs to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * optional int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListInstanceConfigsResponse to the same "parent".
+   * 
+ * + * optional string page_token = 3; + * + * @return Whether the pageToken field is set. + */ + boolean hasPageToken(); + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListInstanceConfigsResponse to the same "parent".
+   * 
+ * + * optional string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListInstanceConfigsResponse to the same "parent".
+   * 
+ * + * optional string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudInstancesAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudInstancesAction.java new file mode 100644 index 00000000000..0915a22818f --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudInstancesAction.java @@ -0,0 +1,1260 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that lists Cloud Spanner databases.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ListCloudInstancesAction} + */ +public final class ListCloudInstancesAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ListCloudInstancesAction) + ListCloudInstancesActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCloudInstancesAction.newBuilder() to construct. + private ListCloudInstancesAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCloudInstancesAction() { + projectId_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCloudInstancesAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudInstancesAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudInstancesAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ListCloudInstancesAction.class, + com.google.spanner.executor.v1.ListCloudInstancesAction.Builder.class); + } + + private int bitField0_; + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer spanner_instance_admin.proto.ListInstancesRequest for
+   * detail.
+   * 
+ * + * optional string filter = 2; + * + * @return Whether the filter field is set. + */ + @java.lang.Override + public boolean hasFilter() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer spanner_instance_admin.proto.ListInstancesRequest for
+   * detail.
+   * 
+ * + * optional string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer spanner_instance_admin.proto.ListInstancesRequest for
+   * detail.
+   * 
+ * + * optional string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * Number of instances to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * optional int32 page_size = 3; + * + * @return Whether the pageSize field is set. + */ + @java.lang.Override + public boolean hasPageSize() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Number of instances to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * optional int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListInstancesResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * optional string page_token = 4; + * + * @return Whether the pageToken field is set. + */ + @java.lang.Override + public boolean hasPageToken() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListInstancesResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * optional string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListInstancesResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * optional string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(3, pageSize_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + 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.executor.v1.ListCloudInstancesAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ListCloudInstancesAction other = + (com.google.spanner.executor.v1.ListCloudInstancesAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (hasFilter() != other.hasFilter()) return false; + if (hasFilter()) { + if (!getFilter().equals(other.getFilter())) return false; + } + if (hasPageSize() != other.hasPageSize()) return false; + if (hasPageSize()) { + if (getPageSize() != other.getPageSize()) return false; + } + if (hasPageToken() != other.hasPageToken()) return false; + if (hasPageToken()) { + if (!getPageToken().equals(other.getPageToken())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + if (hasFilter()) { + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + } + if (hasPageSize()) { + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + } + if (hasPageToken()) { + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ListCloudInstancesAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudInstancesAction 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.executor.v1.ListCloudInstancesAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudInstancesAction 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.executor.v1.ListCloudInstancesAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ListCloudInstancesAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ListCloudInstancesAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudInstancesAction 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.executor.v1.ListCloudInstancesAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudInstancesAction 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.executor.v1.ListCloudInstancesAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ListCloudInstancesAction 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.executor.v1.ListCloudInstancesAction 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; + } + /** + * + * + *
+   * Action that lists Cloud Spanner databases.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ListCloudInstancesAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ListCloudInstancesAction) + com.google.spanner.executor.v1.ListCloudInstancesActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudInstancesAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudInstancesAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ListCloudInstancesAction.class, + com.google.spanner.executor.v1.ListCloudInstancesAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ListCloudInstancesAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ListCloudInstancesAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstancesAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ListCloudInstancesAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstancesAction build() { + com.google.spanner.executor.v1.ListCloudInstancesAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ListCloudInstancesAction buildPartial() { + com.google.spanner.executor.v1.ListCloudInstancesAction result = + new com.google.spanner.executor.v1.ListCloudInstancesAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.ListCloudInstancesAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_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.executor.v1.ListCloudInstancesAction) { + return mergeFrom((com.google.spanner.executor.v1.ListCloudInstancesAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ListCloudInstancesAction other) { + if (other == com.google.spanner.executor.v1.ListCloudInstancesAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasFilter()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPageSize()) { + setPageSize(other.getPageSize()); + } + if (other.hasPageToken()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + 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 projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer spanner_instance_admin.proto.ListInstancesRequest for
+     * detail.
+     * 
+ * + * optional string filter = 2; + * + * @return Whether the filter field is set. + */ + public boolean hasFilter() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer spanner_instance_admin.proto.ListInstancesRequest for
+     * detail.
+     * 
+ * + * optional string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer spanner_instance_admin.proto.ListInstancesRequest for
+     * detail.
+     * 
+ * + * optional string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer spanner_instance_admin.proto.ListInstancesRequest for
+     * detail.
+     * 
+ * + * optional string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer spanner_instance_admin.proto.ListInstancesRequest for
+     * detail.
+     * 
+ * + * optional string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A filter expression that filters what operations are returned in the
+     * response.
+     * The expression must specify the field name, a comparison operator,
+     * and the value that you want to use for filtering.
+     * Refer spanner_instance_admin.proto.ListInstancesRequest for
+     * detail.
+     * 
+ * + * optional string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Number of instances to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * optional int32 page_size = 3; + * + * @return Whether the pageSize field is set. + */ + @java.lang.Override + public boolean hasPageSize() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Number of instances to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * optional int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Number of instances to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * optional int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of instances to be returned in the response. If 0 or
+     * less, defaults to the server's maximum allowed page size.
+     * 
+ * + * optional int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListInstancesResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * optional string page_token = 4; + * + * @return Whether the pageToken field is set. + */ + public boolean hasPageToken() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListInstancesResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * optional string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListInstancesResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * optional string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListInstancesResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * optional string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListInstancesResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * optional string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * If non-empty, "page_token" should contain a next_page_token
+     * from a previous ListInstancesResponse to the same "parent"
+     * and with the same "filter".
+     * 
+ * + * optional string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.ListCloudInstancesAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ListCloudInstancesAction) + private static final com.google.spanner.executor.v1.ListCloudInstancesAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ListCloudInstancesAction(); + } + + public static com.google.spanner.executor.v1.ListCloudInstancesAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCloudInstancesAction 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.executor.v1.ListCloudInstancesAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudInstancesActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudInstancesActionOrBuilder.java new file mode 100644 index 00000000000..b6a066d1390 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ListCloudInstancesActionOrBuilder.java @@ -0,0 +1,172 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ListCloudInstancesActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ListCloudInstancesAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer spanner_instance_admin.proto.ListInstancesRequest for
+   * detail.
+   * 
+ * + * optional string filter = 2; + * + * @return Whether the filter field is set. + */ + boolean hasFilter(); + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer spanner_instance_admin.proto.ListInstancesRequest for
+   * detail.
+   * 
+ * + * optional string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * A filter expression that filters what operations are returned in the
+   * response.
+   * The expression must specify the field name, a comparison operator,
+   * and the value that you want to use for filtering.
+   * Refer spanner_instance_admin.proto.ListInstancesRequest for
+   * detail.
+   * 
+ * + * optional string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Number of instances to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * optional int32 page_size = 3; + * + * @return Whether the pageSize field is set. + */ + boolean hasPageSize(); + /** + * + * + *
+   * Number of instances to be returned in the response. If 0 or
+   * less, defaults to the server's maximum allowed page size.
+   * 
+ * + * optional int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListInstancesResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * optional string page_token = 4; + * + * @return Whether the pageToken field is set. + */ + boolean hasPageToken(); + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListInstancesResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * optional string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * If non-empty, "page_token" should contain a next_page_token
+   * from a previous ListInstancesResponse to the same "parent"
+   * and with the same "filter".
+   * 
+ * + * optional string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/MutationAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/MutationAction.java new file mode 100644 index 00000000000..aa426efc254 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/MutationAction.java @@ -0,0 +1,6790 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * A single mutation request.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.MutationAction} + */ +public final class MutationAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.MutationAction) + MutationActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use MutationAction.newBuilder() to construct. + private MutationAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MutationAction() { + mod_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MutationAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.MutationAction.class, + com.google.spanner.executor.v1.MutationAction.Builder.class); + } + + public interface InsertArgsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.MutationAction.InsertArgs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The names of the columns to be written.
+     * 
+ * + * repeated string column = 1; + * + * @return A list containing the column. + */ + java.util.List getColumnList(); + /** + * + * + *
+     * The names of the columns to be written.
+     * 
+ * + * repeated string column = 1; + * + * @return The count of column. + */ + int getColumnCount(); + /** + * + * + *
+     * The names of the columns to be written.
+     * 
+ * + * repeated string column = 1; + * + * @param index The index of the element to return. + * @return The column at the given index. + */ + java.lang.String getColumn(int index); + /** + * + * + *
+     * The names of the columns to be written.
+     * 
+ * + * repeated string column = 1; + * + * @param index The index of the value to return. + * @return The bytes of the column at the given index. + */ + com.google.protobuf.ByteString getColumnBytes(int index); + + /** + * + * + *
+     * Type information for the "values" entries below.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + java.util.List getTypeList(); + /** + * + * + *
+     * Type information for the "values" entries below.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + com.google.spanner.v1.Type getType(int index); + /** + * + * + *
+     * Type information for the "values" entries below.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + int getTypeCount(); + /** + * + * + *
+     * Type information for the "values" entries below.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + java.util.List getTypeOrBuilderList(); + /** + * + * + *
+     * Type information for the "values" entries below.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder(int index); + + /** + * + * + *
+     * The values to be written.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + java.util.List getValuesList(); + /** + * + * + *
+     * The values to be written.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + com.google.spanner.executor.v1.ValueList getValues(int index); + /** + * + * + *
+     * The values to be written.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + int getValuesCount(); + /** + * + * + *
+     * The values to be written.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + java.util.List + getValuesOrBuilderList(); + /** + * + * + *
+     * The values to be written.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + com.google.spanner.executor.v1.ValueListOrBuilder getValuesOrBuilder(int index); + } + /** + * + * + *
+   * Arguments to Insert, InsertOrUpdate, and Replace operations.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.MutationAction.InsertArgs} + */ + public static final class InsertArgs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.MutationAction.InsertArgs) + InsertArgsOrBuilder { + private static final long serialVersionUID = 0L; + // Use InsertArgs.newBuilder() to construct. + private InsertArgs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InsertArgs() { + column_ = com.google.protobuf.LazyStringArrayList.emptyList(); + type_ = java.util.Collections.emptyList(); + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InsertArgs(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.MutationAction.InsertArgs.class, + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder.class); + } + + public static final int COLUMN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList column_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * The names of the columns to be written.
+     * 
+ * + * repeated string column = 1; + * + * @return A list containing the column. + */ + public com.google.protobuf.ProtocolStringList getColumnList() { + return column_; + } + /** + * + * + *
+     * The names of the columns to be written.
+     * 
+ * + * repeated string column = 1; + * + * @return The count of column. + */ + public int getColumnCount() { + return column_.size(); + } + /** + * + * + *
+     * The names of the columns to be written.
+     * 
+ * + * repeated string column = 1; + * + * @param index The index of the element to return. + * @return The column at the given index. + */ + public java.lang.String getColumn(int index) { + return column_.get(index); + } + /** + * + * + *
+     * The names of the columns to be written.
+     * 
+ * + * repeated string column = 1; + * + * @param index The index of the value to return. + * @return The bytes of the column at the given index. + */ + public com.google.protobuf.ByteString getColumnBytes(int index) { + return column_.getByteString(index); + } + + public static final int TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List type_; + /** + * + * + *
+     * Type information for the "values" entries below.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + @java.lang.Override + public java.util.List getTypeList() { + return type_; + } + /** + * + * + *
+     * Type information for the "values" entries below.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + @java.lang.Override + public java.util.List getTypeOrBuilderList() { + return type_; + } + /** + * + * + *
+     * Type information for the "values" entries below.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + @java.lang.Override + public int getTypeCount() { + return type_.size(); + } + /** + * + * + *
+     * Type information for the "values" entries below.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + @java.lang.Override + public com.google.spanner.v1.Type getType(int index) { + return type_.get(index); + } + /** + * + * + *
+     * Type information for the "values" entries below.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + @java.lang.Override + public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder(int index) { + return type_.get(index); + } + + public static final int VALUES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List values_; + /** + * + * + *
+     * The values to be written.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + * + * + *
+     * The values to be written.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + @java.lang.Override + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + * + * + *
+     * The values to be written.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+     * The values to be written.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueList getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+     * The values to be written.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueListOrBuilder getValuesOrBuilder(int index) { + return values_.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 < column_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, column_.getRaw(i)); + } + for (int i = 0; i < type_.size(); i++) { + output.writeMessage(2, type_.get(i)); + } + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(3, values_.get(i)); + } + 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 < column_.size(); i++) { + dataSize += computeStringSizeNoTag(column_.getRaw(i)); + } + size += dataSize; + size += 1 * getColumnList().size(); + } + for (int i = 0; i < type_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, type_.get(i)); + } + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, values_.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.executor.v1.MutationAction.InsertArgs)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.MutationAction.InsertArgs other = + (com.google.spanner.executor.v1.MutationAction.InsertArgs) obj; + + if (!getColumnList().equals(other.getColumnList())) return false; + if (!getTypeList().equals(other.getTypeList())) return false; + if (!getValuesList().equals(other.getValuesList())) 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 (getColumnCount() > 0) { + hash = (37 * hash) + COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getColumnList().hashCode(); + } + if (getTypeCount() > 0) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTypeList().hashCode(); + } + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.MutationAction.InsertArgs parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.MutationAction.InsertArgs 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.executor.v1.MutationAction.InsertArgs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.MutationAction.InsertArgs 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.executor.v1.MutationAction.InsertArgs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.MutationAction.InsertArgs parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.MutationAction.InsertArgs parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.MutationAction.InsertArgs 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.executor.v1.MutationAction.InsertArgs parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.MutationAction.InsertArgs 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.executor.v1.MutationAction.InsertArgs parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.MutationAction.InsertArgs 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.executor.v1.MutationAction.InsertArgs 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; + } + /** + * + * + *
+     * Arguments to Insert, InsertOrUpdate, and Replace operations.
+     * 
+ * + * Protobuf type {@code google.spanner.executor.v1.MutationAction.InsertArgs} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.MutationAction.InsertArgs) + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.MutationAction.InsertArgs.class, + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.MutationAction.InsertArgs.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + column_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (typeBuilder_ == null) { + type_ = java.util.Collections.emptyList(); + } else { + type_ = null; + typeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + } else { + values_ = null; + valuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_InsertArgs_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.InsertArgs getDefaultInstanceForType() { + return com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.InsertArgs build() { + com.google.spanner.executor.v1.MutationAction.InsertArgs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.InsertArgs buildPartial() { + com.google.spanner.executor.v1.MutationAction.InsertArgs result = + new com.google.spanner.executor.v1.MutationAction.InsertArgs(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.MutationAction.InsertArgs result) { + if (typeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + type_ = java.util.Collections.unmodifiableList(type_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.type_ = type_; + } else { + result.type_ = typeBuilder_.build(); + } + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.MutationAction.InsertArgs result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + column_.makeImmutable(); + result.column_ = column_; + } + } + + @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.executor.v1.MutationAction.InsertArgs) { + return mergeFrom((com.google.spanner.executor.v1.MutationAction.InsertArgs) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.MutationAction.InsertArgs other) { + if (other == com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance()) + return this; + if (!other.column_.isEmpty()) { + if (column_.isEmpty()) { + column_ = other.column_; + bitField0_ |= 0x00000001; + } else { + ensureColumnIsMutable(); + column_.addAll(other.column_); + } + onChanged(); + } + if (typeBuilder_ == null) { + if (!other.type_.isEmpty()) { + if (type_.isEmpty()) { + type_ = other.type_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTypeIsMutable(); + type_.addAll(other.type_); + } + onChanged(); + } + } else { + if (!other.type_.isEmpty()) { + if (typeBuilder_.isEmpty()) { + typeBuilder_.dispose(); + typeBuilder_ = null; + type_ = other.type_; + bitField0_ = (bitField0_ & ~0x00000002); + typeBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTypeFieldBuilder() + : null; + } else { + typeBuilder_.addAllMessages(other.type_); + } + } + } + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000004); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValuesFieldBuilder() + : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureColumnIsMutable(); + column_.add(s); + break; + } // case 10 + case 18: + { + com.google.spanner.v1.Type m = + input.readMessage(com.google.spanner.v1.Type.parser(), extensionRegistry); + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.add(m); + } else { + typeBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.spanner.executor.v1.ValueList m = + input.readMessage( + com.google.spanner.executor.v1.ValueList.parser(), extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.addMessage(m); + } + 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.LazyStringArrayList column_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureColumnIsMutable() { + if (!column_.isModifiable()) { + column_ = new com.google.protobuf.LazyStringArrayList(column_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * The names of the columns to be written.
+       * 
+ * + * repeated string column = 1; + * + * @return A list containing the column. + */ + public com.google.protobuf.ProtocolStringList getColumnList() { + column_.makeImmutable(); + return column_; + } + /** + * + * + *
+       * The names of the columns to be written.
+       * 
+ * + * repeated string column = 1; + * + * @return The count of column. + */ + public int getColumnCount() { + return column_.size(); + } + /** + * + * + *
+       * The names of the columns to be written.
+       * 
+ * + * repeated string column = 1; + * + * @param index The index of the element to return. + * @return The column at the given index. + */ + public java.lang.String getColumn(int index) { + return column_.get(index); + } + /** + * + * + *
+       * The names of the columns to be written.
+       * 
+ * + * repeated string column = 1; + * + * @param index The index of the value to return. + * @return The bytes of the column at the given index. + */ + public com.google.protobuf.ByteString getColumnBytes(int index) { + return column_.getByteString(index); + } + /** + * + * + *
+       * The names of the columns to be written.
+       * 
+ * + * repeated string column = 1; + * + * @param index The index to set the value at. + * @param value The column to set. + * @return This builder for chaining. + */ + public Builder setColumn(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnIsMutable(); + column_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The names of the columns to be written.
+       * 
+ * + * repeated string column = 1; + * + * @param value The column to add. + * @return This builder for chaining. + */ + public Builder addColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnIsMutable(); + column_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The names of the columns to be written.
+       * 
+ * + * repeated string column = 1; + * + * @param values The column to add. + * @return This builder for chaining. + */ + public Builder addAllColumn(java.lang.Iterable values) { + ensureColumnIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, column_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The names of the columns to be written.
+       * 
+ * + * repeated string column = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumn() { + column_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * The names of the columns to be written.
+       * 
+ * + * repeated string column = 1; + * + * @param value The bytes of the column to add. + * @return This builder for chaining. + */ + public Builder addColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureColumnIsMutable(); + column_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List type_ = java.util.Collections.emptyList(); + + private void ensureTypeIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + type_ = new java.util.ArrayList(type_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder> + typeBuilder_; + + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public java.util.List getTypeList() { + if (typeBuilder_ == null) { + return java.util.Collections.unmodifiableList(type_); + } else { + return typeBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public int getTypeCount() { + if (typeBuilder_ == null) { + return type_.size(); + } else { + return typeBuilder_.getCount(); + } + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.Type getType(int index) { + if (typeBuilder_ == null) { + return type_.get(index); + } else { + return typeBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder setType(int index, com.google.spanner.v1.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.set(index, value); + onChanged(); + } else { + typeBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder setType(int index, com.google.spanner.v1.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.set(index, builderForValue.build()); + onChanged(); + } else { + typeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder addType(com.google.spanner.v1.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.add(value); + onChanged(); + } else { + typeBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder addType(int index, com.google.spanner.v1.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.add(index, value); + onChanged(); + } else { + typeBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder addType(com.google.spanner.v1.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.add(builderForValue.build()); + onChanged(); + } else { + typeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder addType(int index, com.google.spanner.v1.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.add(index, builderForValue.build()); + onChanged(); + } else { + typeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder addAllType(java.lang.Iterable values) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, type_); + onChanged(); + } else { + typeBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder clearType() { + if (typeBuilder_ == null) { + type_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + typeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder removeType(int index) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.remove(index); + onChanged(); + } else { + typeBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.Type.Builder getTypeBuilder(int index) { + return getTypeFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder(int index) { + if (typeBuilder_ == null) { + return type_.get(index); + } else { + return typeBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public java.util.List getTypeOrBuilderList() { + if (typeBuilder_ != null) { + return typeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(type_); + } + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.Type.Builder addTypeBuilder() { + return getTypeFieldBuilder().addBuilder(com.google.spanner.v1.Type.getDefaultInstance()); + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.Type.Builder addTypeBuilder(int index) { + return getTypeFieldBuilder() + .addBuilder(index, com.google.spanner.v1.Type.getDefaultInstance()); + } + /** + * + * + *
+       * Type information for the "values" entries below.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public java.util.List getTypeBuilderList() { + return getTypeFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder> + getTypeFieldBuilder() { + if (typeBuilder_ == null) { + typeBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder>( + type_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + type_ = null; + } + return typeBuilder_; + } + + private java.util.List values_ = + java.util.Collections.emptyList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + valuesBuilder_; + + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public com.google.spanner.executor.v1.ValueList getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder setValues(int index, com.google.spanner.executor.v1.ValueList value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder setValues( + int index, com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder addValues(com.google.spanner.executor.v1.ValueList value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder addValues(int index, com.google.spanner.executor.v1.ValueList value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder addValues(com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder addValues( + int index, com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public com.google.spanner.executor.v1.ValueList.Builder getValuesBuilder(int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public com.google.spanner.executor.v1.ValueListOrBuilder getValuesOrBuilder(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder() { + return getValuesFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.ValueList.getDefaultInstance()); + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder(int index) { + return getValuesFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.ValueList.getDefaultInstance()); + } + /** + * + * + *
+       * The values to be written.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder>( + values_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + values_ = null; + } + return valuesBuilder_; + } + + @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.executor.v1.MutationAction.InsertArgs) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.MutationAction.InsertArgs) + private static final com.google.spanner.executor.v1.MutationAction.InsertArgs DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.MutationAction.InsertArgs(); + } + + public static com.google.spanner.executor.v1.MutationAction.InsertArgs getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InsertArgs 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.executor.v1.MutationAction.InsertArgs getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UpdateArgsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.MutationAction.UpdateArgs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The columns to be updated. Identical to InsertArgs.column.
+     * 
+ * + * repeated string column = 1; + * + * @return A list containing the column. + */ + java.util.List getColumnList(); + /** + * + * + *
+     * The columns to be updated. Identical to InsertArgs.column.
+     * 
+ * + * repeated string column = 1; + * + * @return The count of column. + */ + int getColumnCount(); + /** + * + * + *
+     * The columns to be updated. Identical to InsertArgs.column.
+     * 
+ * + * repeated string column = 1; + * + * @param index The index of the element to return. + * @return The column at the given index. + */ + java.lang.String getColumn(int index); + /** + * + * + *
+     * The columns to be updated. Identical to InsertArgs.column.
+     * 
+ * + * repeated string column = 1; + * + * @param index The index of the value to return. + * @return The bytes of the column at the given index. + */ + com.google.protobuf.ByteString getColumnBytes(int index); + + /** + * + * + *
+     * Type information for "values". Identical to InsertArgs.type.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + java.util.List getTypeList(); + /** + * + * + *
+     * Type information for "values". Identical to InsertArgs.type.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + com.google.spanner.v1.Type getType(int index); + /** + * + * + *
+     * Type information for "values". Identical to InsertArgs.type.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + int getTypeCount(); + /** + * + * + *
+     * Type information for "values". Identical to InsertArgs.type.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + java.util.List getTypeOrBuilderList(); + /** + * + * + *
+     * Type information for "values". Identical to InsertArgs.type.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder(int index); + + /** + * + * + *
+     * The values to be updated. Identical to InsertArgs.values.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + java.util.List getValuesList(); + /** + * + * + *
+     * The values to be updated. Identical to InsertArgs.values.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + com.google.spanner.executor.v1.ValueList getValues(int index); + /** + * + * + *
+     * The values to be updated. Identical to InsertArgs.values.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + int getValuesCount(); + /** + * + * + *
+     * The values to be updated. Identical to InsertArgs.values.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + java.util.List + getValuesOrBuilderList(); + /** + * + * + *
+     * The values to be updated. Identical to InsertArgs.values.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + com.google.spanner.executor.v1.ValueListOrBuilder getValuesOrBuilder(int index); + } + /** + * + * + *
+   * Arguments to Update.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.MutationAction.UpdateArgs} + */ + public static final class UpdateArgs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.MutationAction.UpdateArgs) + UpdateArgsOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateArgs.newBuilder() to construct. + private UpdateArgs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateArgs() { + column_ = com.google.protobuf.LazyStringArrayList.emptyList(); + type_ = java.util.Collections.emptyList(); + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateArgs(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.MutationAction.UpdateArgs.class, + com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder.class); + } + + public static final int COLUMN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList column_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * The columns to be updated. Identical to InsertArgs.column.
+     * 
+ * + * repeated string column = 1; + * + * @return A list containing the column. + */ + public com.google.protobuf.ProtocolStringList getColumnList() { + return column_; + } + /** + * + * + *
+     * The columns to be updated. Identical to InsertArgs.column.
+     * 
+ * + * repeated string column = 1; + * + * @return The count of column. + */ + public int getColumnCount() { + return column_.size(); + } + /** + * + * + *
+     * The columns to be updated. Identical to InsertArgs.column.
+     * 
+ * + * repeated string column = 1; + * + * @param index The index of the element to return. + * @return The column at the given index. + */ + public java.lang.String getColumn(int index) { + return column_.get(index); + } + /** + * + * + *
+     * The columns to be updated. Identical to InsertArgs.column.
+     * 
+ * + * repeated string column = 1; + * + * @param index The index of the value to return. + * @return The bytes of the column at the given index. + */ + public com.google.protobuf.ByteString getColumnBytes(int index) { + return column_.getByteString(index); + } + + public static final int TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List type_; + /** + * + * + *
+     * Type information for "values". Identical to InsertArgs.type.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + @java.lang.Override + public java.util.List getTypeList() { + return type_; + } + /** + * + * + *
+     * Type information for "values". Identical to InsertArgs.type.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + @java.lang.Override + public java.util.List getTypeOrBuilderList() { + return type_; + } + /** + * + * + *
+     * Type information for "values". Identical to InsertArgs.type.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + @java.lang.Override + public int getTypeCount() { + return type_.size(); + } + /** + * + * + *
+     * Type information for "values". Identical to InsertArgs.type.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + @java.lang.Override + public com.google.spanner.v1.Type getType(int index) { + return type_.get(index); + } + /** + * + * + *
+     * Type information for "values". Identical to InsertArgs.type.
+     * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + @java.lang.Override + public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder(int index) { + return type_.get(index); + } + + public static final int VALUES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List values_; + /** + * + * + *
+     * The values to be updated. Identical to InsertArgs.values.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + * + * + *
+     * The values to be updated. Identical to InsertArgs.values.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + @java.lang.Override + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + * + * + *
+     * The values to be updated. Identical to InsertArgs.values.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+     * The values to be updated. Identical to InsertArgs.values.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueList getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+     * The values to be updated. Identical to InsertArgs.values.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueListOrBuilder getValuesOrBuilder(int index) { + return values_.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 < column_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, column_.getRaw(i)); + } + for (int i = 0; i < type_.size(); i++) { + output.writeMessage(2, type_.get(i)); + } + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(3, values_.get(i)); + } + 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 < column_.size(); i++) { + dataSize += computeStringSizeNoTag(column_.getRaw(i)); + } + size += dataSize; + size += 1 * getColumnList().size(); + } + for (int i = 0; i < type_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, type_.get(i)); + } + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, values_.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.executor.v1.MutationAction.UpdateArgs)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.MutationAction.UpdateArgs other = + (com.google.spanner.executor.v1.MutationAction.UpdateArgs) obj; + + if (!getColumnList().equals(other.getColumnList())) return false; + if (!getTypeList().equals(other.getTypeList())) return false; + if (!getValuesList().equals(other.getValuesList())) 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 (getColumnCount() > 0) { + hash = (37 * hash) + COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getColumnList().hashCode(); + } + if (getTypeCount() > 0) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTypeList().hashCode(); + } + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.MutationAction.UpdateArgs parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.MutationAction.UpdateArgs 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.executor.v1.MutationAction.UpdateArgs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.MutationAction.UpdateArgs 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.executor.v1.MutationAction.UpdateArgs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.MutationAction.UpdateArgs parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.MutationAction.UpdateArgs parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.MutationAction.UpdateArgs 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.executor.v1.MutationAction.UpdateArgs parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.MutationAction.UpdateArgs 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.executor.v1.MutationAction.UpdateArgs parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.MutationAction.UpdateArgs 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.executor.v1.MutationAction.UpdateArgs 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; + } + /** + * + * + *
+     * Arguments to Update.
+     * 
+ * + * Protobuf type {@code google.spanner.executor.v1.MutationAction.UpdateArgs} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.MutationAction.UpdateArgs) + com.google.spanner.executor.v1.MutationAction.UpdateArgsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.MutationAction.UpdateArgs.class, + com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.MutationAction.UpdateArgs.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + column_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (typeBuilder_ == null) { + type_ = java.util.Collections.emptyList(); + } else { + type_ = null; + typeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + } else { + values_ = null; + valuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_UpdateArgs_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.UpdateArgs getDefaultInstanceForType() { + return com.google.spanner.executor.v1.MutationAction.UpdateArgs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.UpdateArgs build() { + com.google.spanner.executor.v1.MutationAction.UpdateArgs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.UpdateArgs buildPartial() { + com.google.spanner.executor.v1.MutationAction.UpdateArgs result = + new com.google.spanner.executor.v1.MutationAction.UpdateArgs(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.MutationAction.UpdateArgs result) { + if (typeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + type_ = java.util.Collections.unmodifiableList(type_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.type_ = type_; + } else { + result.type_ = typeBuilder_.build(); + } + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.MutationAction.UpdateArgs result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + column_.makeImmutable(); + result.column_ = column_; + } + } + + @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.executor.v1.MutationAction.UpdateArgs) { + return mergeFrom((com.google.spanner.executor.v1.MutationAction.UpdateArgs) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.MutationAction.UpdateArgs other) { + if (other == com.google.spanner.executor.v1.MutationAction.UpdateArgs.getDefaultInstance()) + return this; + if (!other.column_.isEmpty()) { + if (column_.isEmpty()) { + column_ = other.column_; + bitField0_ |= 0x00000001; + } else { + ensureColumnIsMutable(); + column_.addAll(other.column_); + } + onChanged(); + } + if (typeBuilder_ == null) { + if (!other.type_.isEmpty()) { + if (type_.isEmpty()) { + type_ = other.type_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTypeIsMutable(); + type_.addAll(other.type_); + } + onChanged(); + } + } else { + if (!other.type_.isEmpty()) { + if (typeBuilder_.isEmpty()) { + typeBuilder_.dispose(); + typeBuilder_ = null; + type_ = other.type_; + bitField0_ = (bitField0_ & ~0x00000002); + typeBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTypeFieldBuilder() + : null; + } else { + typeBuilder_.addAllMessages(other.type_); + } + } + } + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000004); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValuesFieldBuilder() + : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureColumnIsMutable(); + column_.add(s); + break; + } // case 10 + case 18: + { + com.google.spanner.v1.Type m = + input.readMessage(com.google.spanner.v1.Type.parser(), extensionRegistry); + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.add(m); + } else { + typeBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.spanner.executor.v1.ValueList m = + input.readMessage( + com.google.spanner.executor.v1.ValueList.parser(), extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.addMessage(m); + } + 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.LazyStringArrayList column_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureColumnIsMutable() { + if (!column_.isModifiable()) { + column_ = new com.google.protobuf.LazyStringArrayList(column_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * The columns to be updated. Identical to InsertArgs.column.
+       * 
+ * + * repeated string column = 1; + * + * @return A list containing the column. + */ + public com.google.protobuf.ProtocolStringList getColumnList() { + column_.makeImmutable(); + return column_; + } + /** + * + * + *
+       * The columns to be updated. Identical to InsertArgs.column.
+       * 
+ * + * repeated string column = 1; + * + * @return The count of column. + */ + public int getColumnCount() { + return column_.size(); + } + /** + * + * + *
+       * The columns to be updated. Identical to InsertArgs.column.
+       * 
+ * + * repeated string column = 1; + * + * @param index The index of the element to return. + * @return The column at the given index. + */ + public java.lang.String getColumn(int index) { + return column_.get(index); + } + /** + * + * + *
+       * The columns to be updated. Identical to InsertArgs.column.
+       * 
+ * + * repeated string column = 1; + * + * @param index The index of the value to return. + * @return The bytes of the column at the given index. + */ + public com.google.protobuf.ByteString getColumnBytes(int index) { + return column_.getByteString(index); + } + /** + * + * + *
+       * The columns to be updated. Identical to InsertArgs.column.
+       * 
+ * + * repeated string column = 1; + * + * @param index The index to set the value at. + * @param value The column to set. + * @return This builder for chaining. + */ + public Builder setColumn(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnIsMutable(); + column_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The columns to be updated. Identical to InsertArgs.column.
+       * 
+ * + * repeated string column = 1; + * + * @param value The column to add. + * @return This builder for chaining. + */ + public Builder addColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnIsMutable(); + column_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The columns to be updated. Identical to InsertArgs.column.
+       * 
+ * + * repeated string column = 1; + * + * @param values The column to add. + * @return This builder for chaining. + */ + public Builder addAllColumn(java.lang.Iterable values) { + ensureColumnIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, column_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The columns to be updated. Identical to InsertArgs.column.
+       * 
+ * + * repeated string column = 1; + * + * @return This builder for chaining. + */ + public Builder clearColumn() { + column_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * The columns to be updated. Identical to InsertArgs.column.
+       * 
+ * + * repeated string column = 1; + * + * @param value The bytes of the column to add. + * @return This builder for chaining. + */ + public Builder addColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureColumnIsMutable(); + column_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List type_ = java.util.Collections.emptyList(); + + private void ensureTypeIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + type_ = new java.util.ArrayList(type_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder> + typeBuilder_; + + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public java.util.List getTypeList() { + if (typeBuilder_ == null) { + return java.util.Collections.unmodifiableList(type_); + } else { + return typeBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public int getTypeCount() { + if (typeBuilder_ == null) { + return type_.size(); + } else { + return typeBuilder_.getCount(); + } + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.Type getType(int index) { + if (typeBuilder_ == null) { + return type_.get(index); + } else { + return typeBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder setType(int index, com.google.spanner.v1.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.set(index, value); + onChanged(); + } else { + typeBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder setType(int index, com.google.spanner.v1.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.set(index, builderForValue.build()); + onChanged(); + } else { + typeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder addType(com.google.spanner.v1.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.add(value); + onChanged(); + } else { + typeBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder addType(int index, com.google.spanner.v1.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.add(index, value); + onChanged(); + } else { + typeBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder addType(com.google.spanner.v1.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.add(builderForValue.build()); + onChanged(); + } else { + typeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder addType(int index, com.google.spanner.v1.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.add(index, builderForValue.build()); + onChanged(); + } else { + typeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder addAllType(java.lang.Iterable values) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, type_); + onChanged(); + } else { + typeBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder clearType() { + if (typeBuilder_ == null) { + type_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + typeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public Builder removeType(int index) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.remove(index); + onChanged(); + } else { + typeBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.Type.Builder getTypeBuilder(int index) { + return getTypeFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder(int index) { + if (typeBuilder_ == null) { + return type_.get(index); + } else { + return typeBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public java.util.List getTypeOrBuilderList() { + if (typeBuilder_ != null) { + return typeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(type_); + } + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.Type.Builder addTypeBuilder() { + return getTypeFieldBuilder().addBuilder(com.google.spanner.v1.Type.getDefaultInstance()); + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.Type.Builder addTypeBuilder(int index) { + return getTypeFieldBuilder() + .addBuilder(index, com.google.spanner.v1.Type.getDefaultInstance()); + } + /** + * + * + *
+       * Type information for "values". Identical to InsertArgs.type.
+       * 
+ * + * repeated .google.spanner.v1.Type type = 2; + */ + public java.util.List getTypeBuilderList() { + return getTypeFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder> + getTypeFieldBuilder() { + if (typeBuilder_ == null) { + typeBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder>( + type_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + type_ = null; + } + return typeBuilder_; + } + + private java.util.List values_ = + java.util.Collections.emptyList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + valuesBuilder_; + + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public com.google.spanner.executor.v1.ValueList getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder setValues(int index, com.google.spanner.executor.v1.ValueList value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder setValues( + int index, com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder addValues(com.google.spanner.executor.v1.ValueList value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder addValues(int index, com.google.spanner.executor.v1.ValueList value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder addValues(com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder addValues( + int index, com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public com.google.spanner.executor.v1.ValueList.Builder getValuesBuilder(int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public com.google.spanner.executor.v1.ValueListOrBuilder getValuesOrBuilder(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder() { + return getValuesFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.ValueList.getDefaultInstance()); + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public com.google.spanner.executor.v1.ValueList.Builder addValuesBuilder(int index) { + return getValuesFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.ValueList.getDefaultInstance()); + } + /** + * + * + *
+       * The values to be updated. Identical to InsertArgs.values.
+       * 
+ * + * repeated .google.spanner.executor.v1.ValueList values = 3; + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder>( + values_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + values_ = null; + } + return valuesBuilder_; + } + + @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.executor.v1.MutationAction.UpdateArgs) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.MutationAction.UpdateArgs) + private static final com.google.spanner.executor.v1.MutationAction.UpdateArgs DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.MutationAction.UpdateArgs(); + } + + public static com.google.spanner.executor.v1.MutationAction.UpdateArgs getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateArgs 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.executor.v1.MutationAction.UpdateArgs getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ModOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.MutationAction.Mod) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The table to write.
+     * 
+ * + * string table = 1; + * + * @return The table. + */ + java.lang.String getTable(); + /** + * + * + *
+     * The table to write.
+     * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + com.google.protobuf.ByteString getTableBytes(); + + /** + * + * + *
+     * Exactly one of the remaining elements may be present.
+     * Insert new rows into "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + * + * @return Whether the insert field is set. + */ + boolean hasInsert(); + /** + * + * + *
+     * Exactly one of the remaining elements may be present.
+     * Insert new rows into "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + * + * @return The insert. + */ + com.google.spanner.executor.v1.MutationAction.InsertArgs getInsert(); + /** + * + * + *
+     * Exactly one of the remaining elements may be present.
+     * Insert new rows into "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + */ + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder getInsertOrBuilder(); + + /** + * + * + *
+     * Update columns stored in existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + * + * @return Whether the update field is set. + */ + boolean hasUpdate(); + /** + * + * + *
+     * Update columns stored in existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + * + * @return The update. + */ + com.google.spanner.executor.v1.MutationAction.UpdateArgs getUpdate(); + /** + * + * + *
+     * Update columns stored in existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + */ + com.google.spanner.executor.v1.MutationAction.UpdateArgsOrBuilder getUpdateOrBuilder(); + + /** + * + * + *
+     * Insert or update existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + * + * @return Whether the insertOrUpdate field is set. + */ + boolean hasInsertOrUpdate(); + /** + * + * + *
+     * Insert or update existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + * + * @return The insertOrUpdate. + */ + com.google.spanner.executor.v1.MutationAction.InsertArgs getInsertOrUpdate(); + /** + * + * + *
+     * Insert or update existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + */ + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder getInsertOrUpdateOrBuilder(); + + /** + * + * + *
+     * Replace existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + * + * @return Whether the replace field is set. + */ + boolean hasReplace(); + /** + * + * + *
+     * Replace existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + * + * @return The replace. + */ + com.google.spanner.executor.v1.MutationAction.InsertArgs getReplace(); + /** + * + * + *
+     * Replace existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + */ + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder getReplaceOrBuilder(); + + /** + * + * + *
+     * Delete rows from "table".
+     * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + * + * @return Whether the deleteKeys field is set. + */ + boolean hasDeleteKeys(); + /** + * + * + *
+     * Delete rows from "table".
+     * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + * + * @return The deleteKeys. + */ + com.google.spanner.executor.v1.KeySet getDeleteKeys(); + /** + * + * + *
+     * Delete rows from "table".
+     * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + */ + com.google.spanner.executor.v1.KeySetOrBuilder getDeleteKeysOrBuilder(); + } + /** + * + * + *
+   * Mod represents the write action that will be perform to a table. Each mod
+   * will specify exactly one action, from insert, update, insert_or_update,
+   * replace and delete.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.MutationAction.Mod} + */ + public static final class Mod extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.MutationAction.Mod) + ModOrBuilder { + private static final long serialVersionUID = 0L; + // Use Mod.newBuilder() to construct. + private Mod(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Mod() { + table_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Mod(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_Mod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_Mod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.MutationAction.Mod.class, + com.google.spanner.executor.v1.MutationAction.Mod.Builder.class); + } + + public static final int TABLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object table_ = ""; + /** + * + * + *
+     * The table to write.
+     * 
+ * + * string table = 1; + * + * @return The table. + */ + @java.lang.Override + public java.lang.String getTable() { + java.lang.Object ref = table_; + 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(); + table_ = s; + return s; + } + } + /** + * + * + *
+     * The table to write.
+     * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSERT_FIELD_NUMBER = 2; + private com.google.spanner.executor.v1.MutationAction.InsertArgs insert_; + /** + * + * + *
+     * Exactly one of the remaining elements may be present.
+     * Insert new rows into "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + * + * @return Whether the insert field is set. + */ + @java.lang.Override + public boolean hasInsert() { + return insert_ != null; + } + /** + * + * + *
+     * Exactly one of the remaining elements may be present.
+     * Insert new rows into "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + * + * @return The insert. + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.InsertArgs getInsert() { + return insert_ == null + ? com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance() + : insert_; + } + /** + * + * + *
+     * Exactly one of the remaining elements may be present.
+     * Insert new rows into "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder getInsertOrBuilder() { + return insert_ == null + ? com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance() + : insert_; + } + + public static final int UPDATE_FIELD_NUMBER = 3; + private com.google.spanner.executor.v1.MutationAction.UpdateArgs update_; + /** + * + * + *
+     * Update columns stored in existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + * + * @return Whether the update field is set. + */ + @java.lang.Override + public boolean hasUpdate() { + return update_ != null; + } + /** + * + * + *
+     * Update columns stored in existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + * + * @return The update. + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.UpdateArgs getUpdate() { + return update_ == null + ? com.google.spanner.executor.v1.MutationAction.UpdateArgs.getDefaultInstance() + : update_; + } + /** + * + * + *
+     * Update columns stored in existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.UpdateArgsOrBuilder getUpdateOrBuilder() { + return update_ == null + ? com.google.spanner.executor.v1.MutationAction.UpdateArgs.getDefaultInstance() + : update_; + } + + public static final int INSERT_OR_UPDATE_FIELD_NUMBER = 4; + private com.google.spanner.executor.v1.MutationAction.InsertArgs insertOrUpdate_; + /** + * + * + *
+     * Insert or update existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + * + * @return Whether the insertOrUpdate field is set. + */ + @java.lang.Override + public boolean hasInsertOrUpdate() { + return insertOrUpdate_ != null; + } + /** + * + * + *
+     * Insert or update existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + * + * @return The insertOrUpdate. + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.InsertArgs getInsertOrUpdate() { + return insertOrUpdate_ == null + ? com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance() + : insertOrUpdate_; + } + /** + * + * + *
+     * Insert or update existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder + getInsertOrUpdateOrBuilder() { + return insertOrUpdate_ == null + ? com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance() + : insertOrUpdate_; + } + + public static final int REPLACE_FIELD_NUMBER = 5; + private com.google.spanner.executor.v1.MutationAction.InsertArgs replace_; + /** + * + * + *
+     * Replace existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + * + * @return Whether the replace field is set. + */ + @java.lang.Override + public boolean hasReplace() { + return replace_ != null; + } + /** + * + * + *
+     * Replace existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + * + * @return The replace. + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.InsertArgs getReplace() { + return replace_ == null + ? com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance() + : replace_; + } + /** + * + * + *
+     * Replace existing rows of "table".
+     * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder getReplaceOrBuilder() { + return replace_ == null + ? com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance() + : replace_; + } + + public static final int DELETE_KEYS_FIELD_NUMBER = 6; + private com.google.spanner.executor.v1.KeySet deleteKeys_; + /** + * + * + *
+     * Delete rows from "table".
+     * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + * + * @return Whether the deleteKeys field is set. + */ + @java.lang.Override + public boolean hasDeleteKeys() { + return deleteKeys_ != null; + } + /** + * + * + *
+     * Delete rows from "table".
+     * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + * + * @return The deleteKeys. + */ + @java.lang.Override + public com.google.spanner.executor.v1.KeySet getDeleteKeys() { + return deleteKeys_ == null + ? com.google.spanner.executor.v1.KeySet.getDefaultInstance() + : deleteKeys_; + } + /** + * + * + *
+     * Delete rows from "table".
+     * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + */ + @java.lang.Override + public com.google.spanner.executor.v1.KeySetOrBuilder getDeleteKeysOrBuilder() { + return deleteKeys_ == null + ? com.google.spanner.executor.v1.KeySet.getDefaultInstance() + : deleteKeys_; + } + + 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(table_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, table_); + } + if (insert_ != null) { + output.writeMessage(2, getInsert()); + } + if (update_ != null) { + output.writeMessage(3, getUpdate()); + } + if (insertOrUpdate_ != null) { + output.writeMessage(4, getInsertOrUpdate()); + } + if (replace_ != null) { + output.writeMessage(5, getReplace()); + } + if (deleteKeys_ != null) { + output.writeMessage(6, getDeleteKeys()); + } + 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(table_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + } + if (insert_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInsert()); + } + if (update_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdate()); + } + if (insertOrUpdate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getInsertOrUpdate()); + } + if (replace_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReplace()); + } + if (deleteKeys_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDeleteKeys()); + } + 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.executor.v1.MutationAction.Mod)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.MutationAction.Mod other = + (com.google.spanner.executor.v1.MutationAction.Mod) obj; + + if (!getTable().equals(other.getTable())) return false; + if (hasInsert() != other.hasInsert()) return false; + if (hasInsert()) { + if (!getInsert().equals(other.getInsert())) return false; + } + if (hasUpdate() != other.hasUpdate()) return false; + if (hasUpdate()) { + if (!getUpdate().equals(other.getUpdate())) return false; + } + if (hasInsertOrUpdate() != other.hasInsertOrUpdate()) return false; + if (hasInsertOrUpdate()) { + if (!getInsertOrUpdate().equals(other.getInsertOrUpdate())) return false; + } + if (hasReplace() != other.hasReplace()) return false; + if (hasReplace()) { + if (!getReplace().equals(other.getReplace())) return false; + } + if (hasDeleteKeys() != other.hasDeleteKeys()) return false; + if (hasDeleteKeys()) { + if (!getDeleteKeys().equals(other.getDeleteKeys())) 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) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + if (hasInsert()) { + hash = (37 * hash) + INSERT_FIELD_NUMBER; + hash = (53 * hash) + getInsert().hashCode(); + } + if (hasUpdate()) { + hash = (37 * hash) + UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getUpdate().hashCode(); + } + if (hasInsertOrUpdate()) { + hash = (37 * hash) + INSERT_OR_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getInsertOrUpdate().hashCode(); + } + if (hasReplace()) { + hash = (37 * hash) + REPLACE_FIELD_NUMBER; + hash = (53 * hash) + getReplace().hashCode(); + } + if (hasDeleteKeys()) { + hash = (37 * hash) + DELETE_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getDeleteKeys().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.MutationAction.Mod parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.MutationAction.Mod 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.executor.v1.MutationAction.Mod parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.MutationAction.Mod 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.executor.v1.MutationAction.Mod parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.MutationAction.Mod parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.MutationAction.Mod parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.MutationAction.Mod 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.executor.v1.MutationAction.Mod parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.MutationAction.Mod 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.executor.v1.MutationAction.Mod parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.MutationAction.Mod 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.executor.v1.MutationAction.Mod 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; + } + /** + * + * + *
+     * Mod represents the write action that will be perform to a table. Each mod
+     * will specify exactly one action, from insert, update, insert_or_update,
+     * replace and delete.
+     * 
+ * + * Protobuf type {@code google.spanner.executor.v1.MutationAction.Mod} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.MutationAction.Mod) + com.google.spanner.executor.v1.MutationAction.ModOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_Mod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_Mod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.MutationAction.Mod.class, + com.google.spanner.executor.v1.MutationAction.Mod.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.MutationAction.Mod.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + table_ = ""; + insert_ = null; + if (insertBuilder_ != null) { + insertBuilder_.dispose(); + insertBuilder_ = null; + } + update_ = null; + if (updateBuilder_ != null) { + updateBuilder_.dispose(); + updateBuilder_ = null; + } + insertOrUpdate_ = null; + if (insertOrUpdateBuilder_ != null) { + insertOrUpdateBuilder_.dispose(); + insertOrUpdateBuilder_ = null; + } + replace_ = null; + if (replaceBuilder_ != null) { + replaceBuilder_.dispose(); + replaceBuilder_ = null; + } + deleteKeys_ = null; + if (deleteKeysBuilder_ != null) { + deleteKeysBuilder_.dispose(); + deleteKeysBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_Mod_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.Mod getDefaultInstanceForType() { + return com.google.spanner.executor.v1.MutationAction.Mod.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.Mod build() { + com.google.spanner.executor.v1.MutationAction.Mod result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.Mod buildPartial() { + com.google.spanner.executor.v1.MutationAction.Mod result = + new com.google.spanner.executor.v1.MutationAction.Mod(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.MutationAction.Mod result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.table_ = table_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.insert_ = insertBuilder_ == null ? insert_ : insertBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.update_ = updateBuilder_ == null ? update_ : updateBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.insertOrUpdate_ = + insertOrUpdateBuilder_ == null ? insertOrUpdate_ : insertOrUpdateBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.replace_ = replaceBuilder_ == null ? replace_ : replaceBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.deleteKeys_ = + deleteKeysBuilder_ == null ? deleteKeys_ : deleteKeysBuilder_.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.executor.v1.MutationAction.Mod) { + return mergeFrom((com.google.spanner.executor.v1.MutationAction.Mod) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.MutationAction.Mod other) { + if (other == com.google.spanner.executor.v1.MutationAction.Mod.getDefaultInstance()) + return this; + if (!other.getTable().isEmpty()) { + table_ = other.table_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasInsert()) { + mergeInsert(other.getInsert()); + } + if (other.hasUpdate()) { + mergeUpdate(other.getUpdate()); + } + if (other.hasInsertOrUpdate()) { + mergeInsertOrUpdate(other.getInsertOrUpdate()); + } + if (other.hasReplace()) { + mergeReplace(other.getReplace()); + } + if (other.hasDeleteKeys()) { + mergeDeleteKeys(other.getDeleteKeys()); + } + 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: + { + table_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getInsertFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getInsertOrUpdateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getReplaceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getDeleteKeysFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + 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 table_ = ""; + /** + * + * + *
+       * The table to write.
+       * 
+ * + * string table = 1; + * + * @return The table. + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The table to write.
+       * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The table to write.
+       * 
+ * + * string table = 1; + * + * @param value The table to set. + * @return This builder for chaining. + */ + public Builder setTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The table to write.
+       * 
+ * + * string table = 1; + * + * @return This builder for chaining. + */ + public Builder clearTable() { + table_ = getDefaultInstance().getTable(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The table to write.
+       * 
+ * + * string table = 1; + * + * @param value The bytes for table to set. + * @return This builder for chaining. + */ + public Builder setTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + table_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.spanner.executor.v1.MutationAction.InsertArgs insert_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.InsertArgs, + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder> + insertBuilder_; + /** + * + * + *
+       * Exactly one of the remaining elements may be present.
+       * Insert new rows into "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + * + * @return Whether the insert field is set. + */ + public boolean hasInsert() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Exactly one of the remaining elements may be present.
+       * Insert new rows into "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + * + * @return The insert. + */ + public com.google.spanner.executor.v1.MutationAction.InsertArgs getInsert() { + if (insertBuilder_ == null) { + return insert_ == null + ? com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance() + : insert_; + } else { + return insertBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Exactly one of the remaining elements may be present.
+       * Insert new rows into "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + */ + public Builder setInsert(com.google.spanner.executor.v1.MutationAction.InsertArgs value) { + if (insertBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + insert_ = value; + } else { + insertBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Exactly one of the remaining elements may be present.
+       * Insert new rows into "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + */ + public Builder setInsert( + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder builderForValue) { + if (insertBuilder_ == null) { + insert_ = builderForValue.build(); + } else { + insertBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Exactly one of the remaining elements may be present.
+       * Insert new rows into "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + */ + public Builder mergeInsert(com.google.spanner.executor.v1.MutationAction.InsertArgs value) { + if (insertBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && insert_ != null + && insert_ + != com.google.spanner.executor.v1.MutationAction.InsertArgs + .getDefaultInstance()) { + getInsertBuilder().mergeFrom(value); + } else { + insert_ = value; + } + } else { + insertBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Exactly one of the remaining elements may be present.
+       * Insert new rows into "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + */ + public Builder clearInsert() { + bitField0_ = (bitField0_ & ~0x00000002); + insert_ = null; + if (insertBuilder_ != null) { + insertBuilder_.dispose(); + insertBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Exactly one of the remaining elements may be present.
+       * Insert new rows into "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + */ + public com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder getInsertBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getInsertFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Exactly one of the remaining elements may be present.
+       * Insert new rows into "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + */ + public com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder + getInsertOrBuilder() { + if (insertBuilder_ != null) { + return insertBuilder_.getMessageOrBuilder(); + } else { + return insert_ == null + ? com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance() + : insert_; + } + } + /** + * + * + *
+       * Exactly one of the remaining elements may be present.
+       * Insert new rows into "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.InsertArgs, + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder> + getInsertFieldBuilder() { + if (insertBuilder_ == null) { + insertBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.InsertArgs, + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder>( + getInsert(), getParentForChildren(), isClean()); + insert_ = null; + } + return insertBuilder_; + } + + private com.google.spanner.executor.v1.MutationAction.UpdateArgs update_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.UpdateArgs, + com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder, + com.google.spanner.executor.v1.MutationAction.UpdateArgsOrBuilder> + updateBuilder_; + /** + * + * + *
+       * Update columns stored in existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + * + * @return Whether the update field is set. + */ + public boolean hasUpdate() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Update columns stored in existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + * + * @return The update. + */ + public com.google.spanner.executor.v1.MutationAction.UpdateArgs getUpdate() { + if (updateBuilder_ == null) { + return update_ == null + ? com.google.spanner.executor.v1.MutationAction.UpdateArgs.getDefaultInstance() + : update_; + } else { + return updateBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Update columns stored in existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + */ + public Builder setUpdate(com.google.spanner.executor.v1.MutationAction.UpdateArgs value) { + if (updateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + update_ = value; + } else { + updateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Update columns stored in existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + */ + public Builder setUpdate( + com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder builderForValue) { + if (updateBuilder_ == null) { + update_ = builderForValue.build(); + } else { + updateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Update columns stored in existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + */ + public Builder mergeUpdate(com.google.spanner.executor.v1.MutationAction.UpdateArgs value) { + if (updateBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && update_ != null + && update_ + != com.google.spanner.executor.v1.MutationAction.UpdateArgs + .getDefaultInstance()) { + getUpdateBuilder().mergeFrom(value); + } else { + update_ = value; + } + } else { + updateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Update columns stored in existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + */ + public Builder clearUpdate() { + bitField0_ = (bitField0_ & ~0x00000004); + update_ = null; + if (updateBuilder_ != null) { + updateBuilder_.dispose(); + updateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Update columns stored in existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + */ + public com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder getUpdateBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Update columns stored in existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + */ + public com.google.spanner.executor.v1.MutationAction.UpdateArgsOrBuilder + getUpdateOrBuilder() { + if (updateBuilder_ != null) { + return updateBuilder_.getMessageOrBuilder(); + } else { + return update_ == null + ? com.google.spanner.executor.v1.MutationAction.UpdateArgs.getDefaultInstance() + : update_; + } + } + /** + * + * + *
+       * Update columns stored in existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.UpdateArgs update = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.UpdateArgs, + com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder, + com.google.spanner.executor.v1.MutationAction.UpdateArgsOrBuilder> + getUpdateFieldBuilder() { + if (updateBuilder_ == null) { + updateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.UpdateArgs, + com.google.spanner.executor.v1.MutationAction.UpdateArgs.Builder, + com.google.spanner.executor.v1.MutationAction.UpdateArgsOrBuilder>( + getUpdate(), getParentForChildren(), isClean()); + update_ = null; + } + return updateBuilder_; + } + + private com.google.spanner.executor.v1.MutationAction.InsertArgs insertOrUpdate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.InsertArgs, + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder> + insertOrUpdateBuilder_; + /** + * + * + *
+       * Insert or update existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + * + * @return Whether the insertOrUpdate field is set. + */ + public boolean hasInsertOrUpdate() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Insert or update existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + * + * @return The insertOrUpdate. + */ + public com.google.spanner.executor.v1.MutationAction.InsertArgs getInsertOrUpdate() { + if (insertOrUpdateBuilder_ == null) { + return insertOrUpdate_ == null + ? com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance() + : insertOrUpdate_; + } else { + return insertOrUpdateBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Insert or update existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + */ + public Builder setInsertOrUpdate( + com.google.spanner.executor.v1.MutationAction.InsertArgs value) { + if (insertOrUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + insertOrUpdate_ = value; + } else { + insertOrUpdateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Insert or update existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + */ + public Builder setInsertOrUpdate( + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder builderForValue) { + if (insertOrUpdateBuilder_ == null) { + insertOrUpdate_ = builderForValue.build(); + } else { + insertOrUpdateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Insert or update existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + */ + public Builder mergeInsertOrUpdate( + com.google.spanner.executor.v1.MutationAction.InsertArgs value) { + if (insertOrUpdateBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && insertOrUpdate_ != null + && insertOrUpdate_ + != com.google.spanner.executor.v1.MutationAction.InsertArgs + .getDefaultInstance()) { + getInsertOrUpdateBuilder().mergeFrom(value); + } else { + insertOrUpdate_ = value; + } + } else { + insertOrUpdateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Insert or update existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + */ + public Builder clearInsertOrUpdate() { + bitField0_ = (bitField0_ & ~0x00000008); + insertOrUpdate_ = null; + if (insertOrUpdateBuilder_ != null) { + insertOrUpdateBuilder_.dispose(); + insertOrUpdateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Insert or update existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + */ + public com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder + getInsertOrUpdateBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getInsertOrUpdateFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Insert or update existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + */ + public com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder + getInsertOrUpdateOrBuilder() { + if (insertOrUpdateBuilder_ != null) { + return insertOrUpdateBuilder_.getMessageOrBuilder(); + } else { + return insertOrUpdate_ == null + ? com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance() + : insertOrUpdate_; + } + } + /** + * + * + *
+       * Insert or update existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs insert_or_update = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.InsertArgs, + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder> + getInsertOrUpdateFieldBuilder() { + if (insertOrUpdateBuilder_ == null) { + insertOrUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.InsertArgs, + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder>( + getInsertOrUpdate(), getParentForChildren(), isClean()); + insertOrUpdate_ = null; + } + return insertOrUpdateBuilder_; + } + + private com.google.spanner.executor.v1.MutationAction.InsertArgs replace_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.InsertArgs, + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder> + replaceBuilder_; + /** + * + * + *
+       * Replace existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + * + * @return Whether the replace field is set. + */ + public boolean hasReplace() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * Replace existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + * + * @return The replace. + */ + public com.google.spanner.executor.v1.MutationAction.InsertArgs getReplace() { + if (replaceBuilder_ == null) { + return replace_ == null + ? com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance() + : replace_; + } else { + return replaceBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Replace existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + */ + public Builder setReplace(com.google.spanner.executor.v1.MutationAction.InsertArgs value) { + if (replaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + replace_ = value; + } else { + replaceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Replace existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + */ + public Builder setReplace( + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder builderForValue) { + if (replaceBuilder_ == null) { + replace_ = builderForValue.build(); + } else { + replaceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Replace existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + */ + public Builder mergeReplace(com.google.spanner.executor.v1.MutationAction.InsertArgs value) { + if (replaceBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && replace_ != null + && replace_ + != com.google.spanner.executor.v1.MutationAction.InsertArgs + .getDefaultInstance()) { + getReplaceBuilder().mergeFrom(value); + } else { + replace_ = value; + } + } else { + replaceBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Replace existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + */ + public Builder clearReplace() { + bitField0_ = (bitField0_ & ~0x00000010); + replace_ = null; + if (replaceBuilder_ != null) { + replaceBuilder_.dispose(); + replaceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Replace existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + */ + public com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder getReplaceBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getReplaceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Replace existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + */ + public com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder + getReplaceOrBuilder() { + if (replaceBuilder_ != null) { + return replaceBuilder_.getMessageOrBuilder(); + } else { + return replace_ == null + ? com.google.spanner.executor.v1.MutationAction.InsertArgs.getDefaultInstance() + : replace_; + } + } + /** + * + * + *
+       * Replace existing rows of "table".
+       * 
+ * + * .google.spanner.executor.v1.MutationAction.InsertArgs replace = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.InsertArgs, + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder> + getReplaceFieldBuilder() { + if (replaceBuilder_ == null) { + replaceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.InsertArgs, + com.google.spanner.executor.v1.MutationAction.InsertArgs.Builder, + com.google.spanner.executor.v1.MutationAction.InsertArgsOrBuilder>( + getReplace(), getParentForChildren(), isClean()); + replace_ = null; + } + return replaceBuilder_; + } + + private com.google.spanner.executor.v1.KeySet deleteKeys_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.KeySet, + com.google.spanner.executor.v1.KeySet.Builder, + com.google.spanner.executor.v1.KeySetOrBuilder> + deleteKeysBuilder_; + /** + * + * + *
+       * Delete rows from "table".
+       * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + * + * @return Whether the deleteKeys field is set. + */ + public boolean hasDeleteKeys() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * Delete rows from "table".
+       * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + * + * @return The deleteKeys. + */ + public com.google.spanner.executor.v1.KeySet getDeleteKeys() { + if (deleteKeysBuilder_ == null) { + return deleteKeys_ == null + ? com.google.spanner.executor.v1.KeySet.getDefaultInstance() + : deleteKeys_; + } else { + return deleteKeysBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Delete rows from "table".
+       * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + */ + public Builder setDeleteKeys(com.google.spanner.executor.v1.KeySet value) { + if (deleteKeysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deleteKeys_ = value; + } else { + deleteKeysBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Delete rows from "table".
+       * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + */ + public Builder setDeleteKeys(com.google.spanner.executor.v1.KeySet.Builder builderForValue) { + if (deleteKeysBuilder_ == null) { + deleteKeys_ = builderForValue.build(); + } else { + deleteKeysBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Delete rows from "table".
+       * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + */ + public Builder mergeDeleteKeys(com.google.spanner.executor.v1.KeySet value) { + if (deleteKeysBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && deleteKeys_ != null + && deleteKeys_ != com.google.spanner.executor.v1.KeySet.getDefaultInstance()) { + getDeleteKeysBuilder().mergeFrom(value); + } else { + deleteKeys_ = value; + } + } else { + deleteKeysBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Delete rows from "table".
+       * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + */ + public Builder clearDeleteKeys() { + bitField0_ = (bitField0_ & ~0x00000020); + deleteKeys_ = null; + if (deleteKeysBuilder_ != null) { + deleteKeysBuilder_.dispose(); + deleteKeysBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Delete rows from "table".
+       * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + */ + public com.google.spanner.executor.v1.KeySet.Builder getDeleteKeysBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getDeleteKeysFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Delete rows from "table".
+       * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + */ + public com.google.spanner.executor.v1.KeySetOrBuilder getDeleteKeysOrBuilder() { + if (deleteKeysBuilder_ != null) { + return deleteKeysBuilder_.getMessageOrBuilder(); + } else { + return deleteKeys_ == null + ? com.google.spanner.executor.v1.KeySet.getDefaultInstance() + : deleteKeys_; + } + } + /** + * + * + *
+       * Delete rows from "table".
+       * 
+ * + * .google.spanner.executor.v1.KeySet delete_keys = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.KeySet, + com.google.spanner.executor.v1.KeySet.Builder, + com.google.spanner.executor.v1.KeySetOrBuilder> + getDeleteKeysFieldBuilder() { + if (deleteKeysBuilder_ == null) { + deleteKeysBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.KeySet, + com.google.spanner.executor.v1.KeySet.Builder, + com.google.spanner.executor.v1.KeySetOrBuilder>( + getDeleteKeys(), getParentForChildren(), isClean()); + deleteKeys_ = null; + } + return deleteKeysBuilder_; + } + + @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.executor.v1.MutationAction.Mod) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.MutationAction.Mod) + private static final com.google.spanner.executor.v1.MutationAction.Mod DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.MutationAction.Mod(); + } + + public static com.google.spanner.executor.v1.MutationAction.Mod getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Mod 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.executor.v1.MutationAction.Mod getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int MOD_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List mod_; + /** + * + * + *
+   * Mods that contained in this mutation.
+   * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + @java.lang.Override + public java.util.List getModList() { + return mod_; + } + /** + * + * + *
+   * Mods that contained in this mutation.
+   * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + @java.lang.Override + public java.util.List + getModOrBuilderList() { + return mod_; + } + /** + * + * + *
+   * Mods that contained in this mutation.
+   * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + @java.lang.Override + public int getModCount() { + return mod_.size(); + } + /** + * + * + *
+   * Mods that contained in this mutation.
+   * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.Mod getMod(int index) { + return mod_.get(index); + } + /** + * + * + *
+   * Mods that contained in this mutation.
+   * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction.ModOrBuilder getModOrBuilder(int index) { + return mod_.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 < mod_.size(); i++) { + output.writeMessage(1, mod_.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 < mod_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, mod_.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.executor.v1.MutationAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.MutationAction other = + (com.google.spanner.executor.v1.MutationAction) obj; + + if (!getModList().equals(other.getModList())) 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 (getModCount() > 0) { + hash = (37 * hash) + MOD_FIELD_NUMBER; + hash = (53 * hash) + getModList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.MutationAction parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.MutationAction 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.executor.v1.MutationAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.MutationAction 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.executor.v1.MutationAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.MutationAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.MutationAction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.MutationAction 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.executor.v1.MutationAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.MutationAction 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.executor.v1.MutationAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.MutationAction 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.executor.v1.MutationAction 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 single mutation request.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.MutationAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.MutationAction) + com.google.spanner.executor.v1.MutationActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.MutationAction.class, + com.google.spanner.executor.v1.MutationAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.MutationAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (modBuilder_ == null) { + mod_ = java.util.Collections.emptyList(); + } else { + mod_ = null; + modBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_MutationAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.MutationAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction build() { + com.google.spanner.executor.v1.MutationAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction buildPartial() { + com.google.spanner.executor.v1.MutationAction result = + new com.google.spanner.executor.v1.MutationAction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.executor.v1.MutationAction result) { + if (modBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + mod_ = java.util.Collections.unmodifiableList(mod_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.mod_ = mod_; + } else { + result.mod_ = modBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.MutationAction 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.executor.v1.MutationAction) { + return mergeFrom((com.google.spanner.executor.v1.MutationAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.MutationAction other) { + if (other == com.google.spanner.executor.v1.MutationAction.getDefaultInstance()) return this; + if (modBuilder_ == null) { + if (!other.mod_.isEmpty()) { + if (mod_.isEmpty()) { + mod_ = other.mod_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureModIsMutable(); + mod_.addAll(other.mod_); + } + onChanged(); + } + } else { + if (!other.mod_.isEmpty()) { + if (modBuilder_.isEmpty()) { + modBuilder_.dispose(); + modBuilder_ = null; + mod_ = other.mod_; + bitField0_ = (bitField0_ & ~0x00000001); + modBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getModFieldBuilder() + : null; + } else { + modBuilder_.addAllMessages(other.mod_); + } + } + } + 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.executor.v1.MutationAction.Mod m = + input.readMessage( + com.google.spanner.executor.v1.MutationAction.Mod.parser(), + extensionRegistry); + if (modBuilder_ == null) { + ensureModIsMutable(); + mod_.add(m); + } else { + modBuilder_.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 mod_ = + java.util.Collections.emptyList(); + + private void ensureModIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + mod_ = new java.util.ArrayList(mod_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.Mod, + com.google.spanner.executor.v1.MutationAction.Mod.Builder, + com.google.spanner.executor.v1.MutationAction.ModOrBuilder> + modBuilder_; + + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public java.util.List getModList() { + if (modBuilder_ == null) { + return java.util.Collections.unmodifiableList(mod_); + } else { + return modBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public int getModCount() { + if (modBuilder_ == null) { + return mod_.size(); + } else { + return modBuilder_.getCount(); + } + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public com.google.spanner.executor.v1.MutationAction.Mod getMod(int index) { + if (modBuilder_ == null) { + return mod_.get(index); + } else { + return modBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public Builder setMod(int index, com.google.spanner.executor.v1.MutationAction.Mod value) { + if (modBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModIsMutable(); + mod_.set(index, value); + onChanged(); + } else { + modBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public Builder setMod( + int index, com.google.spanner.executor.v1.MutationAction.Mod.Builder builderForValue) { + if (modBuilder_ == null) { + ensureModIsMutable(); + mod_.set(index, builderForValue.build()); + onChanged(); + } else { + modBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public Builder addMod(com.google.spanner.executor.v1.MutationAction.Mod value) { + if (modBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModIsMutable(); + mod_.add(value); + onChanged(); + } else { + modBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public Builder addMod(int index, com.google.spanner.executor.v1.MutationAction.Mod value) { + if (modBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModIsMutable(); + mod_.add(index, value); + onChanged(); + } else { + modBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public Builder addMod( + com.google.spanner.executor.v1.MutationAction.Mod.Builder builderForValue) { + if (modBuilder_ == null) { + ensureModIsMutable(); + mod_.add(builderForValue.build()); + onChanged(); + } else { + modBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public Builder addMod( + int index, com.google.spanner.executor.v1.MutationAction.Mod.Builder builderForValue) { + if (modBuilder_ == null) { + ensureModIsMutable(); + mod_.add(index, builderForValue.build()); + onChanged(); + } else { + modBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public Builder addAllMod( + java.lang.Iterable values) { + if (modBuilder_ == null) { + ensureModIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mod_); + onChanged(); + } else { + modBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public Builder clearMod() { + if (modBuilder_ == null) { + mod_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + modBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public Builder removeMod(int index) { + if (modBuilder_ == null) { + ensureModIsMutable(); + mod_.remove(index); + onChanged(); + } else { + modBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public com.google.spanner.executor.v1.MutationAction.Mod.Builder getModBuilder(int index) { + return getModFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public com.google.spanner.executor.v1.MutationAction.ModOrBuilder getModOrBuilder(int index) { + if (modBuilder_ == null) { + return mod_.get(index); + } else { + return modBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public java.util.List + getModOrBuilderList() { + if (modBuilder_ != null) { + return modBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mod_); + } + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public com.google.spanner.executor.v1.MutationAction.Mod.Builder addModBuilder() { + return getModFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.MutationAction.Mod.getDefaultInstance()); + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public com.google.spanner.executor.v1.MutationAction.Mod.Builder addModBuilder(int index) { + return getModFieldBuilder() + .addBuilder( + index, com.google.spanner.executor.v1.MutationAction.Mod.getDefaultInstance()); + } + /** + * + * + *
+     * Mods that contained in this mutation.
+     * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + public java.util.List + getModBuilderList() { + return getModFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.Mod, + com.google.spanner.executor.v1.MutationAction.Mod.Builder, + com.google.spanner.executor.v1.MutationAction.ModOrBuilder> + getModFieldBuilder() { + if (modBuilder_ == null) { + modBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction.Mod, + com.google.spanner.executor.v1.MutationAction.Mod.Builder, + com.google.spanner.executor.v1.MutationAction.ModOrBuilder>( + mod_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + mod_ = null; + } + return modBuilder_; + } + + @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.executor.v1.MutationAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.MutationAction) + private static final com.google.spanner.executor.v1.MutationAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.MutationAction(); + } + + public static com.google.spanner.executor.v1.MutationAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MutationAction 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.executor.v1.MutationAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/MutationActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/MutationActionOrBuilder.java new file mode 100644 index 00000000000..b0ccf3f80f5 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/MutationActionOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface MutationActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.MutationAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Mods that contained in this mutation.
+   * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + java.util.List getModList(); + /** + * + * + *
+   * Mods that contained in this mutation.
+   * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + com.google.spanner.executor.v1.MutationAction.Mod getMod(int index); + /** + * + * + *
+   * Mods that contained in this mutation.
+   * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + int getModCount(); + /** + * + * + *
+   * Mods that contained in this mutation.
+   * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + java.util.List + getModOrBuilderList(); + /** + * + * + *
+   * Mods that contained in this mutation.
+   * 
+ * + * repeated .google.spanner.executor.v1.MutationAction.Mod mod = 1; + */ + com.google.spanner.executor.v1.MutationAction.ModOrBuilder getModOrBuilder(int index); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/OperationResponse.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/OperationResponse.java new file mode 100644 index 00000000000..e427e7bf92d --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/OperationResponse.java @@ -0,0 +1,1387 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * OperationResponse contains results returned by operation related actions.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.OperationResponse} + */ +public final class OperationResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.OperationResponse) + OperationResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationResponse.newBuilder() to construct. + private OperationResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationResponse() { + listedOperations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_OperationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_OperationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.OperationResponse.class, + com.google.spanner.executor.v1.OperationResponse.Builder.class); + } + + public static final int LISTED_OPERATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List listedOperations_; + /** + * + * + *
+   * List of operations returned by ListOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + @java.lang.Override + public java.util.List getListedOperationsList() { + return listedOperations_; + } + /** + * + * + *
+   * List of operations returned by ListOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + @java.lang.Override + public java.util.List + getListedOperationsOrBuilderList() { + return listedOperations_; + } + /** + * + * + *
+   * List of operations returned by ListOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + @java.lang.Override + public int getListedOperationsCount() { + return listedOperations_.size(); + } + /** + * + * + *
+   * List of operations returned by ListOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + @java.lang.Override + public com.google.longrunning.Operation getListedOperations(int index) { + return listedOperations_.get(index); + } + /** + * + * + *
+   * List of operations returned by ListOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + @java.lang.Override + public com.google.longrunning.OperationOrBuilder getListedOperationsOrBuilder(int index) { + return listedOperations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPERATION_FIELD_NUMBER = 3; + private com.google.longrunning.Operation operation_; + /** + * + * + *
+   * Operation returned by GetOperationAction.
+   * 
+ * + * .google.longrunning.Operation operation = 3; + * + * @return Whether the operation field is set. + */ + @java.lang.Override + public boolean hasOperation() { + return operation_ != null; + } + /** + * + * + *
+   * Operation returned by GetOperationAction.
+   * 
+ * + * .google.longrunning.Operation operation = 3; + * + * @return The operation. + */ + @java.lang.Override + public com.google.longrunning.Operation getOperation() { + return operation_ == null ? com.google.longrunning.Operation.getDefaultInstance() : operation_; + } + /** + * + * + *
+   * Operation returned by GetOperationAction.
+   * 
+ * + * .google.longrunning.Operation operation = 3; + */ + @java.lang.Override + public com.google.longrunning.OperationOrBuilder getOperationOrBuilder() { + return operation_ == null ? com.google.longrunning.Operation.getDefaultInstance() : operation_; + } + + 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 < listedOperations_.size(); i++) { + output.writeMessage(1, listedOperations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + if (operation_ != null) { + output.writeMessage(3, getOperation()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < listedOperations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, listedOperations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + if (operation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOperation()); + } + 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.executor.v1.OperationResponse)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.OperationResponse other = + (com.google.spanner.executor.v1.OperationResponse) obj; + + if (!getListedOperationsList().equals(other.getListedOperationsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (hasOperation() != other.hasOperation()) return false; + if (hasOperation()) { + if (!getOperation().equals(other.getOperation())) 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 (getListedOperationsCount() > 0) { + hash = (37 * hash) + LISTED_OPERATIONS_FIELD_NUMBER; + hash = (53 * hash) + getListedOperationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (hasOperation()) { + hash = (37 * hash) + OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getOperation().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.OperationResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.OperationResponse 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.executor.v1.OperationResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.OperationResponse 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.executor.v1.OperationResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.OperationResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.OperationResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.OperationResponse 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.executor.v1.OperationResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.OperationResponse 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.executor.v1.OperationResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.OperationResponse 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.executor.v1.OperationResponse 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; + } + /** + * + * + *
+   * OperationResponse contains results returned by operation related actions.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.OperationResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.OperationResponse) + com.google.spanner.executor.v1.OperationResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_OperationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_OperationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.OperationResponse.class, + com.google.spanner.executor.v1.OperationResponse.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.OperationResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (listedOperationsBuilder_ == null) { + listedOperations_ = java.util.Collections.emptyList(); + } else { + listedOperations_ = null; + listedOperationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + operation_ = null; + if (operationBuilder_ != null) { + operationBuilder_.dispose(); + operationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_OperationResponse_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.OperationResponse getDefaultInstanceForType() { + return com.google.spanner.executor.v1.OperationResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.OperationResponse build() { + com.google.spanner.executor.v1.OperationResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.OperationResponse buildPartial() { + com.google.spanner.executor.v1.OperationResponse result = + new com.google.spanner.executor.v1.OperationResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.OperationResponse result) { + if (listedOperationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + listedOperations_ = java.util.Collections.unmodifiableList(listedOperations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.listedOperations_ = listedOperations_; + } else { + result.listedOperations_ = listedOperationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.OperationResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.operation_ = operationBuilder_ == null ? operation_ : operationBuilder_.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.executor.v1.OperationResponse) { + return mergeFrom((com.google.spanner.executor.v1.OperationResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.OperationResponse other) { + if (other == com.google.spanner.executor.v1.OperationResponse.getDefaultInstance()) + return this; + if (listedOperationsBuilder_ == null) { + if (!other.listedOperations_.isEmpty()) { + if (listedOperations_.isEmpty()) { + listedOperations_ = other.listedOperations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureListedOperationsIsMutable(); + listedOperations_.addAll(other.listedOperations_); + } + onChanged(); + } + } else { + if (!other.listedOperations_.isEmpty()) { + if (listedOperationsBuilder_.isEmpty()) { + listedOperationsBuilder_.dispose(); + listedOperationsBuilder_ = null; + listedOperations_ = other.listedOperations_; + bitField0_ = (bitField0_ & ~0x00000001); + listedOperationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getListedOperationsFieldBuilder() + : null; + } else { + listedOperationsBuilder_.addAllMessages(other.listedOperations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasOperation()) { + mergeOperation(other.getOperation()); + } + 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.longrunning.Operation m = + input.readMessage(com.google.longrunning.Operation.parser(), extensionRegistry); + if (listedOperationsBuilder_ == null) { + ensureListedOperationsIsMutable(); + listedOperations_.add(m); + } else { + listedOperationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getOperationFieldBuilder().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 java.util.List listedOperations_ = + java.util.Collections.emptyList(); + + private void ensureListedOperationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + listedOperations_ = + new java.util.ArrayList(listedOperations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder> + listedOperationsBuilder_; + + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public java.util.List getListedOperationsList() { + if (listedOperationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(listedOperations_); + } else { + return listedOperationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public int getListedOperationsCount() { + if (listedOperationsBuilder_ == null) { + return listedOperations_.size(); + } else { + return listedOperationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public com.google.longrunning.Operation getListedOperations(int index) { + if (listedOperationsBuilder_ == null) { + return listedOperations_.get(index); + } else { + return listedOperationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public Builder setListedOperations(int index, com.google.longrunning.Operation value) { + if (listedOperationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedOperationsIsMutable(); + listedOperations_.set(index, value); + onChanged(); + } else { + listedOperationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public Builder setListedOperations( + int index, com.google.longrunning.Operation.Builder builderForValue) { + if (listedOperationsBuilder_ == null) { + ensureListedOperationsIsMutable(); + listedOperations_.set(index, builderForValue.build()); + onChanged(); + } else { + listedOperationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public Builder addListedOperations(com.google.longrunning.Operation value) { + if (listedOperationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedOperationsIsMutable(); + listedOperations_.add(value); + onChanged(); + } else { + listedOperationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public Builder addListedOperations(int index, com.google.longrunning.Operation value) { + if (listedOperationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureListedOperationsIsMutable(); + listedOperations_.add(index, value); + onChanged(); + } else { + listedOperationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public Builder addListedOperations(com.google.longrunning.Operation.Builder builderForValue) { + if (listedOperationsBuilder_ == null) { + ensureListedOperationsIsMutable(); + listedOperations_.add(builderForValue.build()); + onChanged(); + } else { + listedOperationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public Builder addListedOperations( + int index, com.google.longrunning.Operation.Builder builderForValue) { + if (listedOperationsBuilder_ == null) { + ensureListedOperationsIsMutable(); + listedOperations_.add(index, builderForValue.build()); + onChanged(); + } else { + listedOperationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public Builder addAllListedOperations( + java.lang.Iterable values) { + if (listedOperationsBuilder_ == null) { + ensureListedOperationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, listedOperations_); + onChanged(); + } else { + listedOperationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public Builder clearListedOperations() { + if (listedOperationsBuilder_ == null) { + listedOperations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + listedOperationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public Builder removeListedOperations(int index) { + if (listedOperationsBuilder_ == null) { + ensureListedOperationsIsMutable(); + listedOperations_.remove(index); + onChanged(); + } else { + listedOperationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public com.google.longrunning.Operation.Builder getListedOperationsBuilder(int index) { + return getListedOperationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public com.google.longrunning.OperationOrBuilder getListedOperationsOrBuilder(int index) { + if (listedOperationsBuilder_ == null) { + return listedOperations_.get(index); + } else { + return listedOperationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public java.util.List + getListedOperationsOrBuilderList() { + if (listedOperationsBuilder_ != null) { + return listedOperationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(listedOperations_); + } + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public com.google.longrunning.Operation.Builder addListedOperationsBuilder() { + return getListedOperationsFieldBuilder() + .addBuilder(com.google.longrunning.Operation.getDefaultInstance()); + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public com.google.longrunning.Operation.Builder addListedOperationsBuilder(int index) { + return getListedOperationsFieldBuilder() + .addBuilder(index, com.google.longrunning.Operation.getDefaultInstance()); + } + /** + * + * + *
+     * List of operations returned by ListOperationsAction.
+     * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + public java.util.List + getListedOperationsBuilderList() { + return getListedOperationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder> + getListedOperationsFieldBuilder() { + if (listedOperationsBuilder_ == null) { + listedOperationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder>( + listedOperations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + listedOperations_ = null; + } + return listedOperationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * "next_page_token" can be sent in a subsequent list action
+     * to fetch more of the matching data.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.longrunning.Operation operation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder> + operationBuilder_; + /** + * + * + *
+     * Operation returned by GetOperationAction.
+     * 
+ * + * .google.longrunning.Operation operation = 3; + * + * @return Whether the operation field is set. + */ + public boolean hasOperation() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Operation returned by GetOperationAction.
+     * 
+ * + * .google.longrunning.Operation operation = 3; + * + * @return The operation. + */ + public com.google.longrunning.Operation getOperation() { + if (operationBuilder_ == null) { + return operation_ == null + ? com.google.longrunning.Operation.getDefaultInstance() + : operation_; + } else { + return operationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operation returned by GetOperationAction.
+     * 
+ * + * .google.longrunning.Operation operation = 3; + */ + public Builder setOperation(com.google.longrunning.Operation value) { + if (operationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operation_ = value; + } else { + operationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation returned by GetOperationAction.
+     * 
+ * + * .google.longrunning.Operation operation = 3; + */ + public Builder setOperation(com.google.longrunning.Operation.Builder builderForValue) { + if (operationBuilder_ == null) { + operation_ = builderForValue.build(); + } else { + operationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation returned by GetOperationAction.
+     * 
+ * + * .google.longrunning.Operation operation = 3; + */ + public Builder mergeOperation(com.google.longrunning.Operation value) { + if (operationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && operation_ != null + && operation_ != com.google.longrunning.Operation.getDefaultInstance()) { + getOperationBuilder().mergeFrom(value); + } else { + operation_ = value; + } + } else { + operationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Operation returned by GetOperationAction.
+     * 
+ * + * .google.longrunning.Operation operation = 3; + */ + public Builder clearOperation() { + bitField0_ = (bitField0_ & ~0x00000004); + operation_ = null; + if (operationBuilder_ != null) { + operationBuilder_.dispose(); + operationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operation returned by GetOperationAction.
+     * 
+ * + * .google.longrunning.Operation operation = 3; + */ + public com.google.longrunning.Operation.Builder getOperationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOperationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operation returned by GetOperationAction.
+     * 
+ * + * .google.longrunning.Operation operation = 3; + */ + public com.google.longrunning.OperationOrBuilder getOperationOrBuilder() { + if (operationBuilder_ != null) { + return operationBuilder_.getMessageOrBuilder(); + } else { + return operation_ == null + ? com.google.longrunning.Operation.getDefaultInstance() + : operation_; + } + } + /** + * + * + *
+     * Operation returned by GetOperationAction.
+     * 
+ * + * .google.longrunning.Operation operation = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder> + getOperationFieldBuilder() { + if (operationBuilder_ == null) { + operationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.longrunning.Operation, + com.google.longrunning.Operation.Builder, + com.google.longrunning.OperationOrBuilder>( + getOperation(), getParentForChildren(), isClean()); + operation_ = null; + } + return operationBuilder_; + } + + @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.executor.v1.OperationResponse) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.OperationResponse) + private static final com.google.spanner.executor.v1.OperationResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.OperationResponse(); + } + + public static com.google.spanner.executor.v1.OperationResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationResponse 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.executor.v1.OperationResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/OperationResponseOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/OperationResponseOrBuilder.java new file mode 100644 index 00000000000..2b36023bf5f --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/OperationResponseOrBuilder.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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface OperationResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.OperationResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of operations returned by ListOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + java.util.List getListedOperationsList(); + /** + * + * + *
+   * List of operations returned by ListOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + com.google.longrunning.Operation getListedOperations(int index); + /** + * + * + *
+   * List of operations returned by ListOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + int getListedOperationsCount(); + /** + * + * + *
+   * List of operations returned by ListOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + java.util.List + getListedOperationsOrBuilderList(); + /** + * + * + *
+   * List of operations returned by ListOperationsAction.
+   * 
+ * + * repeated .google.longrunning.Operation listed_operations = 1; + */ + com.google.longrunning.OperationOrBuilder getListedOperationsOrBuilder(int index); + + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * "next_page_token" can be sent in a subsequent list action
+   * to fetch more of the matching data.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Operation returned by GetOperationAction.
+   * 
+ * + * .google.longrunning.Operation operation = 3; + * + * @return Whether the operation field is set. + */ + boolean hasOperation(); + /** + * + * + *
+   * Operation returned by GetOperationAction.
+   * 
+ * + * .google.longrunning.Operation operation = 3; + * + * @return The operation. + */ + com.google.longrunning.Operation getOperation(); + /** + * + * + *
+   * Operation returned by GetOperationAction.
+   * 
+ * + * .google.longrunning.Operation operation = 3; + */ + com.google.longrunning.OperationOrBuilder getOperationOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/PartitionedUpdateAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/PartitionedUpdateAction.java new file mode 100644 index 00000000000..ee24bb9a499 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/PartitionedUpdateAction.java @@ -0,0 +1,1998 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * PartitionedUpdateAction defines an action to execute a partitioned DML
+ * which runs different partitions in parallel.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.PartitionedUpdateAction} + */ +public final class PartitionedUpdateAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.PartitionedUpdateAction) + PartitionedUpdateActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use PartitionedUpdateAction.newBuilder() to construct. + private PartitionedUpdateAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PartitionedUpdateAction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PartitionedUpdateAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.PartitionedUpdateAction.class, + com.google.spanner.executor.v1.PartitionedUpdateAction.Builder.class); + } + + public interface ExecutePartitionedUpdateOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * RPC Priority
+     * 
+ * + * optional .google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + * + * @return Whether the rpcPriority field is set. + */ + boolean hasRpcPriority(); + /** + * + * + *
+     * RPC Priority
+     * 
+ * + * optional .google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + * + * @return The enum numeric value on the wire for rpcPriority. + */ + int getRpcPriorityValue(); + /** + * + * + *
+     * RPC Priority
+     * 
+ * + * optional .google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + * + * @return The rpcPriority. + */ + com.google.spanner.v1.RequestOptions.Priority getRpcPriority(); + + /** + * + * + *
+     * Transaction tag
+     * 
+ * + * optional string tag = 2; + * + * @return Whether the tag field is set. + */ + boolean hasTag(); + /** + * + * + *
+     * Transaction tag
+     * 
+ * + * optional string tag = 2; + * + * @return The tag. + */ + java.lang.String getTag(); + /** + * + * + *
+     * Transaction tag
+     * 
+ * + * optional string tag = 2; + * + * @return The bytes for tag. + */ + com.google.protobuf.ByteString getTagBytes(); + } + /** + * Protobuf type {@code + * google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions} + */ + public static final class ExecutePartitionedUpdateOptions + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions) + ExecutePartitionedUpdateOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecutePartitionedUpdateOptions.newBuilder() to construct. + private ExecutePartitionedUpdateOptions( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecutePartitionedUpdateOptions() { + rpcPriority_ = 0; + tag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecutePartitionedUpdateOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + .class, + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + .Builder.class); + } + + private int bitField0_; + public static final int RPC_PRIORITY_FIELD_NUMBER = 1; + private int rpcPriority_ = 0; + /** + * + * + *
+     * RPC Priority
+     * 
+ * + * optional .google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + * + * @return Whether the rpcPriority field is set. + */ + @java.lang.Override + public boolean hasRpcPriority() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * RPC Priority
+     * 
+ * + * optional .google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + * + * @return The enum numeric value on the wire for rpcPriority. + */ + @java.lang.Override + public int getRpcPriorityValue() { + return rpcPriority_; + } + /** + * + * + *
+     * RPC Priority
+     * 
+ * + * optional .google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + * + * @return The rpcPriority. + */ + @java.lang.Override + public com.google.spanner.v1.RequestOptions.Priority getRpcPriority() { + com.google.spanner.v1.RequestOptions.Priority result = + com.google.spanner.v1.RequestOptions.Priority.forNumber(rpcPriority_); + return result == null ? com.google.spanner.v1.RequestOptions.Priority.UNRECOGNIZED : result; + } + + public static final int TAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object tag_ = ""; + /** + * + * + *
+     * Transaction tag
+     * 
+ * + * optional string tag = 2; + * + * @return Whether the tag field is set. + */ + @java.lang.Override + public boolean hasTag() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Transaction tag
+     * 
+ * + * optional string tag = 2; + * + * @return The tag. + */ + @java.lang.Override + public java.lang.String getTag() { + java.lang.Object ref = tag_; + 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(); + tag_ = s; + return s; + } + } + /** + * + * + *
+     * Transaction tag
+     * 
+ * + * optional string tag = 2; + * + * @return The bytes for tag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(1, rpcPriority_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, rpcPriority_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tag_); + } + 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.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions other = + (com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions) + obj; + + if (hasRpcPriority() != other.hasRpcPriority()) return false; + if (hasRpcPriority()) { + if (rpcPriority_ != other.rpcPriority_) return false; + } + if (hasTag() != other.hasTag()) return false; + if (hasTag()) { + if (!getTag().equals(other.getTag())) 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 (hasRpcPriority()) { + hash = (37 * hash) + RPC_PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + rpcPriority_; + } + if (hasTag()) { + hash = (37 * hash) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + 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.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + 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.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + 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.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + 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.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + 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.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + 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; + } + /** + * Protobuf type {@code + * google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions) + com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions.class, + com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions.Builder.class); + } + + // Construct using + // com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rpcPriority_ = 0; + tag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_ExecutePartitionedUpdateOptions_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + getDefaultInstanceForType() { + return com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + build() { + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + buildPartial() { + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + result = + new com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rpcPriority_ = rpcPriority_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tag_ = tag_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_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.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions) { + return mergeFrom( + (com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + other) { + if (other + == com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions.getDefaultInstance()) return this; + if (other.hasRpcPriority()) { + setRpcPriority(other.getRpcPriority()); + } + if (other.hasTag()) { + tag_ = other.tag_; + bitField0_ |= 0x00000002; + onChanged(); + } + 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: + { + rpcPriority_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + tag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 int rpcPriority_ = 0; + /** + * + * + *
+       * RPC Priority
+       * 
+ * + * optional .google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + * + * @return Whether the rpcPriority field is set. + */ + @java.lang.Override + public boolean hasRpcPriority() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * RPC Priority
+       * 
+ * + * optional .google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + * + * @return The enum numeric value on the wire for rpcPriority. + */ + @java.lang.Override + public int getRpcPriorityValue() { + return rpcPriority_; + } + /** + * + * + *
+       * RPC Priority
+       * 
+ * + * optional .google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + * + * @param value The enum numeric value on the wire for rpcPriority to set. + * @return This builder for chaining. + */ + public Builder setRpcPriorityValue(int value) { + rpcPriority_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * RPC Priority
+       * 
+ * + * optional .google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + * + * @return The rpcPriority. + */ + @java.lang.Override + public com.google.spanner.v1.RequestOptions.Priority getRpcPriority() { + com.google.spanner.v1.RequestOptions.Priority result = + com.google.spanner.v1.RequestOptions.Priority.forNumber(rpcPriority_); + return result == null ? com.google.spanner.v1.RequestOptions.Priority.UNRECOGNIZED : result; + } + /** + * + * + *
+       * RPC Priority
+       * 
+ * + * optional .google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + * + * @param value The rpcPriority to set. + * @return This builder for chaining. + */ + public Builder setRpcPriority(com.google.spanner.v1.RequestOptions.Priority value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + rpcPriority_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * RPC Priority
+       * 
+ * + * optional .google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + * + * @return This builder for chaining. + */ + public Builder clearRpcPriority() { + bitField0_ = (bitField0_ & ~0x00000001); + rpcPriority_ = 0; + onChanged(); + return this; + } + + private java.lang.Object tag_ = ""; + /** + * + * + *
+       * Transaction tag
+       * 
+ * + * optional string tag = 2; + * + * @return Whether the tag field is set. + */ + public boolean hasTag() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Transaction tag
+       * 
+ * + * optional string tag = 2; + * + * @return The tag. + */ + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Transaction tag
+       * 
+ * + * optional string tag = 2; + * + * @return The bytes for tag. + */ + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Transaction tag
+       * 
+ * + * optional string tag = 2; + * + * @param value The tag to set. + * @return This builder for chaining. + */ + public Builder setTag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Transaction tag
+       * 
+ * + * optional string tag = 2; + * + * @return This builder for chaining. + */ + public Builder clearTag() { + tag_ = getDefaultInstance().getTag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Transaction tag
+       * 
+ * + * optional string tag = 2; + * + * @param value The bytes for tag to set. + * @return This builder for chaining. + */ + public Builder setTagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions) + private static final com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions(); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecutePartitionedUpdateOptions 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.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int OPTIONS_FIELD_NUMBER = 1; + private com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + options_; + /** + * + * + *
+   * Options for partitioned update.
+   * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + * + * @return Whether the options field is set. + */ + @java.lang.Override + public boolean hasOptions() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Options for partitioned update.
+   * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + * + * @return The options. + */ + @java.lang.Override + public com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + getOptions() { + return options_ == null + ? com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + .getDefaultInstance() + : options_; + } + /** + * + * + *
+   * Options for partitioned update.
+   * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptionsOrBuilder + getOptionsOrBuilder() { + return options_ == null + ? com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + .getDefaultInstance() + : options_; + } + + public static final int UPDATE_FIELD_NUMBER = 2; + private com.google.spanner.executor.v1.QueryAction update_; + /** + * + * + *
+   * Partitioned dml query.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + * + * @return Whether the update field is set. + */ + @java.lang.Override + public boolean hasUpdate() { + return update_ != null; + } + /** + * + * + *
+   * Partitioned dml query.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + * + * @return The update. + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction getUpdate() { + return update_ == null + ? com.google.spanner.executor.v1.QueryAction.getDefaultInstance() + : update_; + } + /** + * + * + *
+   * Partitioned dml query.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryActionOrBuilder getUpdateOrBuilder() { + return update_ == null + ? com.google.spanner.executor.v1.QueryAction.getDefaultInstance() + : update_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getOptions()); + } + if (update_ != null) { + output.writeMessage(2, getUpdate()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOptions()); + } + if (update_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdate()); + } + 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.executor.v1.PartitionedUpdateAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.PartitionedUpdateAction other = + (com.google.spanner.executor.v1.PartitionedUpdateAction) obj; + + if (hasOptions() != other.hasOptions()) return false; + if (hasOptions()) { + if (!getOptions().equals(other.getOptions())) return false; + } + if (hasUpdate() != other.hasUpdate()) return false; + if (hasUpdate()) { + if (!getUpdate().equals(other.getUpdate())) 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 (hasOptions()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptions().hashCode(); + } + if (hasUpdate()) { + hash = (37 * hash) + UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getUpdate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction 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.executor.v1.PartitionedUpdateAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction 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.executor.v1.PartitionedUpdateAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction 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.executor.v1.PartitionedUpdateAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction 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.executor.v1.PartitionedUpdateAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction 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.executor.v1.PartitionedUpdateAction 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; + } + /** + * + * + *
+   * PartitionedUpdateAction defines an action to execute a partitioned DML
+   * which runs different partitions in parallel.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.PartitionedUpdateAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.PartitionedUpdateAction) + com.google.spanner.executor.v1.PartitionedUpdateActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.PartitionedUpdateAction.class, + com.google.spanner.executor.v1.PartitionedUpdateAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.PartitionedUpdateAction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOptionsFieldBuilder(); + getUpdateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + options_ = null; + if (optionsBuilder_ != null) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + } + update_ = null; + if (updateBuilder_ != null) { + updateBuilder_.dispose(); + updateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_PartitionedUpdateAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.PartitionedUpdateAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.PartitionedUpdateAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.PartitionedUpdateAction build() { + com.google.spanner.executor.v1.PartitionedUpdateAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.PartitionedUpdateAction buildPartial() { + com.google.spanner.executor.v1.PartitionedUpdateAction result = + new com.google.spanner.executor.v1.PartitionedUpdateAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.PartitionedUpdateAction result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.options_ = optionsBuilder_ == null ? options_ : optionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.update_ = updateBuilder_ == null ? update_ : updateBuilder_.build(); + } + result.bitField0_ |= to_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.executor.v1.PartitionedUpdateAction) { + return mergeFrom((com.google.spanner.executor.v1.PartitionedUpdateAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.PartitionedUpdateAction other) { + if (other == com.google.spanner.executor.v1.PartitionedUpdateAction.getDefaultInstance()) + return this; + if (other.hasOptions()) { + mergeOptions(other.getOptions()); + } + if (other.hasUpdate()) { + mergeUpdate(other.getUpdate()); + } + 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: + { + input.readMessage(getOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + options_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions, + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + .Builder, + com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptionsOrBuilder> + optionsBuilder_; + /** + * + * + *
+     * Options for partitioned update.
+     * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + * + * @return Whether the options field is set. + */ + public boolean hasOptions() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Options for partitioned update.
+     * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + * + * @return The options. + */ + public com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + getOptions() { + if (optionsBuilder_ == null) { + return options_ == null + ? com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + .getDefaultInstance() + : options_; + } else { + return optionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Options for partitioned update.
+     * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + */ + public Builder setOptions( + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + } else { + optionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Options for partitioned update.
+     * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + */ + public Builder setOptions( + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + .Builder + builderForValue) { + if (optionsBuilder_ == null) { + options_ = builderForValue.build(); + } else { + optionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Options for partitioned update.
+     * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + */ + public Builder mergeOptions( + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + value) { + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && options_ != null + && options_ + != com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions.getDefaultInstance()) { + getOptionsBuilder().mergeFrom(value); + } else { + options_ = value; + } + } else { + optionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Options for partitioned update.
+     * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + */ + public Builder clearOptions() { + bitField0_ = (bitField0_ & ~0x00000001); + options_ = null; + if (optionsBuilder_ != null) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Options for partitioned update.
+     * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + */ + public com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + .Builder + getOptionsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Options for partitioned update.
+     * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + */ + public com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptionsOrBuilder + getOptionsOrBuilder() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilder(); + } else { + return options_ == null + ? com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + .getDefaultInstance() + : options_; + } + } + /** + * + * + *
+     * Options for partitioned update.
+     * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions, + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + .Builder, + com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptionsOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions, + com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptions.Builder, + com.google.spanner.executor.v1.PartitionedUpdateAction + .ExecutePartitionedUpdateOptionsOrBuilder>( + getOptions(), getParentForChildren(), isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private com.google.spanner.executor.v1.QueryAction update_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder> + updateBuilder_; + /** + * + * + *
+     * Partitioned dml query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + * + * @return Whether the update field is set. + */ + public boolean hasUpdate() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Partitioned dml query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + * + * @return The update. + */ + public com.google.spanner.executor.v1.QueryAction getUpdate() { + if (updateBuilder_ == null) { + return update_ == null + ? com.google.spanner.executor.v1.QueryAction.getDefaultInstance() + : update_; + } else { + return updateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Partitioned dml query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + */ + public Builder setUpdate(com.google.spanner.executor.v1.QueryAction value) { + if (updateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + update_ = value; + } else { + updateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Partitioned dml query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + */ + public Builder setUpdate(com.google.spanner.executor.v1.QueryAction.Builder builderForValue) { + if (updateBuilder_ == null) { + update_ = builderForValue.build(); + } else { + updateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Partitioned dml query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + */ + public Builder mergeUpdate(com.google.spanner.executor.v1.QueryAction value) { + if (updateBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && update_ != null + && update_ != com.google.spanner.executor.v1.QueryAction.getDefaultInstance()) { + getUpdateBuilder().mergeFrom(value); + } else { + update_ = value; + } + } else { + updateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Partitioned dml query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + */ + public Builder clearUpdate() { + bitField0_ = (bitField0_ & ~0x00000002); + update_ = null; + if (updateBuilder_ != null) { + updateBuilder_.dispose(); + updateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Partitioned dml query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + */ + public com.google.spanner.executor.v1.QueryAction.Builder getUpdateBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Partitioned dml query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + */ + public com.google.spanner.executor.v1.QueryActionOrBuilder getUpdateOrBuilder() { + if (updateBuilder_ != null) { + return updateBuilder_.getMessageOrBuilder(); + } else { + return update_ == null + ? com.google.spanner.executor.v1.QueryAction.getDefaultInstance() + : update_; + } + } + /** + * + * + *
+     * Partitioned dml query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder> + getUpdateFieldBuilder() { + if (updateBuilder_ == null) { + updateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder>( + getUpdate(), getParentForChildren(), isClean()); + update_ = null; + } + return updateBuilder_; + } + + @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.executor.v1.PartitionedUpdateAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.PartitionedUpdateAction) + private static final com.google.spanner.executor.v1.PartitionedUpdateAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.PartitionedUpdateAction(); + } + + public static com.google.spanner.executor.v1.PartitionedUpdateAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartitionedUpdateAction 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.executor.v1.PartitionedUpdateAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/PartitionedUpdateActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/PartitionedUpdateActionOrBuilder.java new file mode 100644 index 00000000000..c0cad580e62 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/PartitionedUpdateActionOrBuilder.java @@ -0,0 +1,103 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface PartitionedUpdateActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.PartitionedUpdateAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Options for partitioned update.
+   * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + * + * @return Whether the options field is set. + */ + boolean hasOptions(); + /** + * + * + *
+   * Options for partitioned update.
+   * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + * + * @return The options. + */ + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + getOptions(); + /** + * + * + *
+   * Options for partitioned update.
+   * 
+ * + * + * optional .google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions options = 1; + * + */ + com.google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptionsOrBuilder + getOptionsOrBuilder(); + + /** + * + * + *
+   * Partitioned dml query.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + * + * @return Whether the update field is set. + */ + boolean hasUpdate(); + /** + * + * + *
+   * Partitioned dml query.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + * + * @return The update. + */ + com.google.spanner.executor.v1.QueryAction getUpdate(); + /** + * + * + *
+   * Partitioned dml query.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction update = 2; + */ + com.google.spanner.executor.v1.QueryActionOrBuilder getUpdateOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryAction.java new file mode 100644 index 00000000000..f39dec65282 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryAction.java @@ -0,0 +1,2353 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * A SQL query request.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.QueryAction} + */ +public final class QueryAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.QueryAction) + QueryActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueryAction.newBuilder() to construct. + private QueryAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueryAction() { + sql_ = ""; + params_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.QueryAction.class, + com.google.spanner.executor.v1.QueryAction.Builder.class); + } + + public interface ParameterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.QueryAction.Parameter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Name of the parameter (with no leading @).
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Name of the parameter (with no leading @).
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Type of the parameter.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + * + * @return Whether the type field is set. + */ + boolean hasType(); + /** + * + * + *
+     * Type of the parameter.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + * + * @return The type. + */ + com.google.spanner.v1.Type getType(); + /** + * + * + *
+     * Type of the parameter.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + */ + com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder(); + + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.spanner.executor.v1.Value value = 3; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.spanner.executor.v1.Value value = 3; + * + * @return The value. + */ + com.google.spanner.executor.v1.Value getValue(); + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.spanner.executor.v1.Value value = 3; + */ + com.google.spanner.executor.v1.ValueOrBuilder getValueOrBuilder(); + } + /** + * + * + *
+   * Parameter that bind to placeholders in the SQL string
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.QueryAction.Parameter} + */ + public static final class Parameter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.QueryAction.Parameter) + ParameterOrBuilder { + private static final long serialVersionUID = 0L; + // Use Parameter.newBuilder() to construct. + private Parameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Parameter() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Parameter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryAction_Parameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryAction_Parameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.QueryAction.Parameter.class, + com.google.spanner.executor.v1.QueryAction.Parameter.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the parameter (with no leading @).
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Name of the parameter (with no leading @).
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private com.google.spanner.v1.Type type_; + /** + * + * + *
+     * Type of the parameter.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return type_ != null; + } + /** + * + * + *
+     * Type of the parameter.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.spanner.v1.Type getType() { + return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_; + } + /** + * + * + *
+     * Type of the parameter.
+     * 
+ * + * .google.spanner.v1.Type type = 2; + */ + @java.lang.Override + public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() { + return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_; + } + + public static final int VALUE_FIELD_NUMBER = 3; + private com.google.spanner.executor.v1.Value value_; + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.spanner.executor.v1.Value value = 3; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return value_ != null; + } + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.spanner.executor.v1.Value value = 3; + * + * @return The value. + */ + @java.lang.Override + public com.google.spanner.executor.v1.Value getValue() { + return value_ == null ? com.google.spanner.executor.v1.Value.getDefaultInstance() : value_; + } + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.spanner.executor.v1.Value value = 3; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueOrBuilder getValueOrBuilder() { + return value_ == null ? com.google.spanner.executor.v1.Value.getDefaultInstance() : value_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ != null) { + output.writeMessage(2, getType()); + } + if (value_ != null) { + output.writeMessage(3, getValue()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (type_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType()); + } + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getValue()); + } + 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.executor.v1.QueryAction.Parameter)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.QueryAction.Parameter other = + (com.google.spanner.executor.v1.QueryAction.Parameter) obj; + + if (!getName().equals(other.getName())) return false; + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (!getType().equals(other.getType())) return false; + } + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue().equals(other.getValue())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + } + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.QueryAction.Parameter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.QueryAction.Parameter 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.executor.v1.QueryAction.Parameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.QueryAction.Parameter 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.executor.v1.QueryAction.Parameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.QueryAction.Parameter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.QueryAction.Parameter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.QueryAction.Parameter 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.executor.v1.QueryAction.Parameter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.QueryAction.Parameter 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.executor.v1.QueryAction.Parameter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.QueryAction.Parameter 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.executor.v1.QueryAction.Parameter 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; + } + /** + * + * + *
+     * Parameter that bind to placeholders in the SQL string
+     * 
+ * + * Protobuf type {@code google.spanner.executor.v1.QueryAction.Parameter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.QueryAction.Parameter) + com.google.spanner.executor.v1.QueryAction.ParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryAction_Parameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryAction_Parameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.QueryAction.Parameter.class, + com.google.spanner.executor.v1.QueryAction.Parameter.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.QueryAction.Parameter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryAction_Parameter_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction.Parameter getDefaultInstanceForType() { + return com.google.spanner.executor.v1.QueryAction.Parameter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction.Parameter build() { + com.google.spanner.executor.v1.QueryAction.Parameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction.Parameter buildPartial() { + com.google.spanner.executor.v1.QueryAction.Parameter result = + new com.google.spanner.executor.v1.QueryAction.Parameter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.QueryAction.Parameter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = typeBuilder_ == null ? type_ : typeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.value_ = valueBuilder_ == null ? value_ : valueBuilder_.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.executor.v1.QueryAction.Parameter) { + return mergeFrom((com.google.spanner.executor.v1.QueryAction.Parameter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.QueryAction.Parameter other) { + if (other == com.google.spanner.executor.v1.QueryAction.Parameter.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasType()) { + mergeType(other.getType()); + } + if (other.hasValue()) { + mergeValue(other.getValue()); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getValueFieldBuilder().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 java.lang.Object name_ = ""; + /** + * + * + *
+       * Name of the parameter (with no leading @).
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of the parameter (with no leading @).
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of the parameter (with no leading @).
+       * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the parameter (with no leading @).
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the parameter (with no leading @).
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.spanner.v1.Type type_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder> + typeBuilder_; + /** + * + * + *
+       * Type of the parameter.
+       * 
+ * + * .google.spanner.v1.Type type = 2; + * + * @return Whether the type field is set. + */ + public boolean hasType() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Type of the parameter.
+       * 
+ * + * .google.spanner.v1.Type type = 2; + * + * @return The type. + */ + public com.google.spanner.v1.Type getType() { + if (typeBuilder_ == null) { + return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_; + } else { + return typeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Type of the parameter.
+       * 
+ * + * .google.spanner.v1.Type type = 2; + */ + public Builder setType(com.google.spanner.v1.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + } else { + typeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Type of the parameter.
+       * 
+ * + * .google.spanner.v1.Type type = 2; + */ + public Builder setType(com.google.spanner.v1.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + type_ = builderForValue.build(); + } else { + typeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Type of the parameter.
+       * 
+ * + * .google.spanner.v1.Type type = 2; + */ + public Builder mergeType(com.google.spanner.v1.Type value) { + if (typeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && type_ != null + && type_ != com.google.spanner.v1.Type.getDefaultInstance()) { + getTypeBuilder().mergeFrom(value); + } else { + type_ = value; + } + } else { + typeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Type of the parameter.
+       * 
+ * + * .google.spanner.v1.Type type = 2; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Type of the parameter.
+       * 
+ * + * .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.Type.Builder getTypeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTypeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Type of the parameter.
+       * 
+ * + * .google.spanner.v1.Type type = 2; + */ + public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() { + if (typeBuilder_ != null) { + return typeBuilder_.getMessageOrBuilder(); + } else { + return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_; + } + } + /** + * + * + *
+       * Type of the parameter.
+       * 
+ * + * .google.spanner.v1.Type type = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder> + getTypeFieldBuilder() { + if (typeBuilder_ == null) { + typeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder>( + getType(), getParentForChildren(), isClean()); + type_ = null; + } + return typeBuilder_; + } + + private com.google.spanner.executor.v1.Value value_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.Value, + com.google.spanner.executor.v1.Value.Builder, + com.google.spanner.executor.v1.ValueOrBuilder> + valueBuilder_; + /** + * + * + *
+       * Value of the parameter.
+       * 
+ * + * .google.spanner.executor.v1.Value value = 3; + * + * @return Whether the value field is set. + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Value of the parameter.
+       * 
+ * + * .google.spanner.executor.v1.Value value = 3; + * + * @return The value. + */ + public com.google.spanner.executor.v1.Value getValue() { + if (valueBuilder_ == null) { + return value_ == null + ? com.google.spanner.executor.v1.Value.getDefaultInstance() + : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Value of the parameter.
+       * 
+ * + * .google.spanner.executor.v1.Value value = 3; + */ + public Builder setValue(com.google.spanner.executor.v1.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + } else { + valueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Value of the parameter.
+       * 
+ * + * .google.spanner.executor.v1.Value value = 3; + */ + public Builder setValue(com.google.spanner.executor.v1.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Value of the parameter.
+       * 
+ * + * .google.spanner.executor.v1.Value value = 3; + */ + public Builder mergeValue(com.google.spanner.executor.v1.Value value) { + if (valueBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && value_ != null + && value_ != com.google.spanner.executor.v1.Value.getDefaultInstance()) { + getValueBuilder().mergeFrom(value); + } else { + value_ = value; + } + } else { + valueBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Value of the parameter.
+       * 
+ * + * .google.spanner.executor.v1.Value value = 3; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000004); + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Value of the parameter.
+       * 
+ * + * .google.spanner.executor.v1.Value value = 3; + */ + public com.google.spanner.executor.v1.Value.Builder getValueBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Value of the parameter.
+       * 
+ * + * .google.spanner.executor.v1.Value value = 3; + */ + public com.google.spanner.executor.v1.ValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null + ? com.google.spanner.executor.v1.Value.getDefaultInstance() + : value_; + } + } + /** + * + * + *
+       * Value of the parameter.
+       * 
+ * + * .google.spanner.executor.v1.Value value = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.Value, + com.google.spanner.executor.v1.Value.Builder, + com.google.spanner.executor.v1.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.Value, + com.google.spanner.executor.v1.Value.Builder, + com.google.spanner.executor.v1.ValueOrBuilder>( + getValue(), getParentForChildren(), isClean()); + value_ = null; + } + return valueBuilder_; + } + + @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.executor.v1.QueryAction.Parameter) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.QueryAction.Parameter) + private static final com.google.spanner.executor.v1.QueryAction.Parameter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.QueryAction.Parameter(); + } + + public static com.google.spanner.executor.v1.QueryAction.Parameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Parameter 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.executor.v1.QueryAction.Parameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SQL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object sql_ = ""; + /** + * + * + *
+   * The SQL string.
+   * 
+ * + * string sql = 1; + * + * @return The sql. + */ + @java.lang.Override + public java.lang.String getSql() { + java.lang.Object ref = sql_; + 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(); + sql_ = s; + return s; + } + } + /** + * + * + *
+   * The SQL string.
+   * 
+ * + * string sql = 1; + * + * @return The bytes for sql. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSqlBytes() { + java.lang.Object ref = sql_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sql_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List params_; + /** + * + * + *
+   * Parameters for the SQL string.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + @java.lang.Override + public java.util.List getParamsList() { + return params_; + } + /** + * + * + *
+   * Parameters for the SQL string.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + @java.lang.Override + public java.util.List + getParamsOrBuilderList() { + return params_; + } + /** + * + * + *
+   * Parameters for the SQL string.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + @java.lang.Override + public int getParamsCount() { + return params_.size(); + } + /** + * + * + *
+   * Parameters for the SQL string.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction.Parameter getParams(int index) { + return params_.get(index); + } + /** + * + * + *
+   * Parameters for the SQL string.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction.ParameterOrBuilder getParamsOrBuilder( + int index) { + return params_.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(sql_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sql_); + } + for (int i = 0; i < params_.size(); i++) { + output.writeMessage(2, params_.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(sql_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sql_); + } + for (int i = 0; i < params_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, params_.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.executor.v1.QueryAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.QueryAction other = + (com.google.spanner.executor.v1.QueryAction) obj; + + if (!getSql().equals(other.getSql())) return false; + if (!getParamsList().equals(other.getParamsList())) 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) + SQL_FIELD_NUMBER; + hash = (53 * hash) + getSql().hashCode(); + if (getParamsCount() > 0) { + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getParamsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.QueryAction parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.QueryAction 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.executor.v1.QueryAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.QueryAction 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.executor.v1.QueryAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.QueryAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.QueryAction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.QueryAction 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.executor.v1.QueryAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.QueryAction 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.executor.v1.QueryAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.QueryAction 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.executor.v1.QueryAction 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 SQL query request.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.QueryAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.QueryAction) + com.google.spanner.executor.v1.QueryActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.QueryAction.class, + com.google.spanner.executor.v1.QueryAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.QueryAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sql_ = ""; + if (paramsBuilder_ == null) { + params_ = java.util.Collections.emptyList(); + } else { + params_ = null; + paramsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.QueryAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction build() { + com.google.spanner.executor.v1.QueryAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction buildPartial() { + com.google.spanner.executor.v1.QueryAction result = + new com.google.spanner.executor.v1.QueryAction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.executor.v1.QueryAction result) { + if (paramsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + params_ = java.util.Collections.unmodifiableList(params_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.params_ = params_; + } else { + result.params_ = paramsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.QueryAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sql_ = sql_; + } + } + + @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.executor.v1.QueryAction) { + return mergeFrom((com.google.spanner.executor.v1.QueryAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.QueryAction other) { + if (other == com.google.spanner.executor.v1.QueryAction.getDefaultInstance()) return this; + if (!other.getSql().isEmpty()) { + sql_ = other.sql_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (paramsBuilder_ == null) { + if (!other.params_.isEmpty()) { + if (params_.isEmpty()) { + params_ = other.params_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureParamsIsMutable(); + params_.addAll(other.params_); + } + onChanged(); + } + } else { + if (!other.params_.isEmpty()) { + if (paramsBuilder_.isEmpty()) { + paramsBuilder_.dispose(); + paramsBuilder_ = null; + params_ = other.params_; + bitField0_ = (bitField0_ & ~0x00000002); + paramsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getParamsFieldBuilder() + : null; + } else { + paramsBuilder_.addAllMessages(other.params_); + } + } + } + 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: + { + sql_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.spanner.executor.v1.QueryAction.Parameter m = + input.readMessage( + com.google.spanner.executor.v1.QueryAction.Parameter.parser(), + extensionRegistry); + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.add(m); + } else { + paramsBuilder_.addMessage(m); + } + break; + } // case 18 + 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 sql_ = ""; + /** + * + * + *
+     * The SQL string.
+     * 
+ * + * string sql = 1; + * + * @return The sql. + */ + public java.lang.String getSql() { + java.lang.Object ref = sql_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sql_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The SQL string.
+     * 
+ * + * string sql = 1; + * + * @return The bytes for sql. + */ + public com.google.protobuf.ByteString getSqlBytes() { + java.lang.Object ref = sql_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sql_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The SQL string.
+     * 
+ * + * string sql = 1; + * + * @param value The sql to set. + * @return This builder for chaining. + */ + public Builder setSql(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sql_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The SQL string.
+     * 
+ * + * string sql = 1; + * + * @return This builder for chaining. + */ + public Builder clearSql() { + sql_ = getDefaultInstance().getSql(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The SQL string.
+     * 
+ * + * string sql = 1; + * + * @param value The bytes for sql to set. + * @return This builder for chaining. + */ + public Builder setSqlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sql_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List params_ = + java.util.Collections.emptyList(); + + private void ensureParamsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + params_ = + new java.util.ArrayList(params_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction.Parameter, + com.google.spanner.executor.v1.QueryAction.Parameter.Builder, + com.google.spanner.executor.v1.QueryAction.ParameterOrBuilder> + paramsBuilder_; + + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public java.util.List getParamsList() { + if (paramsBuilder_ == null) { + return java.util.Collections.unmodifiableList(params_); + } else { + return paramsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public int getParamsCount() { + if (paramsBuilder_ == null) { + return params_.size(); + } else { + return paramsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public com.google.spanner.executor.v1.QueryAction.Parameter getParams(int index) { + if (paramsBuilder_ == null) { + return params_.get(index); + } else { + return paramsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public Builder setParams( + int index, com.google.spanner.executor.v1.QueryAction.Parameter value) { + if (paramsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamsIsMutable(); + params_.set(index, value); + onChanged(); + } else { + paramsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public Builder setParams( + int index, com.google.spanner.executor.v1.QueryAction.Parameter.Builder builderForValue) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.set(index, builderForValue.build()); + onChanged(); + } else { + paramsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public Builder addParams(com.google.spanner.executor.v1.QueryAction.Parameter value) { + if (paramsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamsIsMutable(); + params_.add(value); + onChanged(); + } else { + paramsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public Builder addParams( + int index, com.google.spanner.executor.v1.QueryAction.Parameter value) { + if (paramsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamsIsMutable(); + params_.add(index, value); + onChanged(); + } else { + paramsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public Builder addParams( + com.google.spanner.executor.v1.QueryAction.Parameter.Builder builderForValue) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.add(builderForValue.build()); + onChanged(); + } else { + paramsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public Builder addParams( + int index, com.google.spanner.executor.v1.QueryAction.Parameter.Builder builderForValue) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.add(index, builderForValue.build()); + onChanged(); + } else { + paramsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public Builder addAllParams( + java.lang.Iterable values) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, params_); + onChanged(); + } else { + paramsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public Builder clearParams() { + if (paramsBuilder_ == null) { + params_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + paramsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public Builder removeParams(int index) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.remove(index); + onChanged(); + } else { + paramsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public com.google.spanner.executor.v1.QueryAction.Parameter.Builder getParamsBuilder( + int index) { + return getParamsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public com.google.spanner.executor.v1.QueryAction.ParameterOrBuilder getParamsOrBuilder( + int index) { + if (paramsBuilder_ == null) { + return params_.get(index); + } else { + return paramsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public java.util.List + getParamsOrBuilderList() { + if (paramsBuilder_ != null) { + return paramsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(params_); + } + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public com.google.spanner.executor.v1.QueryAction.Parameter.Builder addParamsBuilder() { + return getParamsFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.QueryAction.Parameter.getDefaultInstance()); + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public com.google.spanner.executor.v1.QueryAction.Parameter.Builder addParamsBuilder( + int index) { + return getParamsFieldBuilder() + .addBuilder( + index, com.google.spanner.executor.v1.QueryAction.Parameter.getDefaultInstance()); + } + /** + * + * + *
+     * Parameters for the SQL string.
+     * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + public java.util.List + getParamsBuilderList() { + return getParamsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction.Parameter, + com.google.spanner.executor.v1.QueryAction.Parameter.Builder, + com.google.spanner.executor.v1.QueryAction.ParameterOrBuilder> + getParamsFieldBuilder() { + if (paramsBuilder_ == null) { + paramsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction.Parameter, + com.google.spanner.executor.v1.QueryAction.Parameter.Builder, + com.google.spanner.executor.v1.QueryAction.ParameterOrBuilder>( + params_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + params_ = null; + } + return paramsBuilder_; + } + + @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.executor.v1.QueryAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.QueryAction) + private static final com.google.spanner.executor.v1.QueryAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.QueryAction(); + } + + public static com.google.spanner.executor.v1.QueryAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryAction 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.executor.v1.QueryAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryActionOrBuilder.java new file mode 100644 index 00000000000..5a9fb614d31 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryActionOrBuilder.java @@ -0,0 +1,102 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface QueryActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.QueryAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The SQL string.
+   * 
+ * + * string sql = 1; + * + * @return The sql. + */ + java.lang.String getSql(); + /** + * + * + *
+   * The SQL string.
+   * 
+ * + * string sql = 1; + * + * @return The bytes for sql. + */ + com.google.protobuf.ByteString getSqlBytes(); + + /** + * + * + *
+   * Parameters for the SQL string.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + java.util.List getParamsList(); + /** + * + * + *
+   * Parameters for the SQL string.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + com.google.spanner.executor.v1.QueryAction.Parameter getParams(int index); + /** + * + * + *
+   * Parameters for the SQL string.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + int getParamsCount(); + /** + * + * + *
+   * Parameters for the SQL string.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + java.util.List + getParamsOrBuilderList(); + /** + * + * + *
+   * Parameters for the SQL string.
+   * 
+ * + * repeated .google.spanner.executor.v1.QueryAction.Parameter params = 2; + */ + com.google.spanner.executor.v1.QueryAction.ParameterOrBuilder getParamsOrBuilder(int index); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryResult.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryResult.java new file mode 100644 index 00000000000..485bffb85dc --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryResult.java @@ -0,0 +1,1225 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * QueryResult contains result of a Query.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.QueryResult} + */ +public final class QueryResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.QueryResult) + QueryResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueryResult.newBuilder() to construct. + private QueryResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueryResult() { + row_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.QueryResult.class, + com.google.spanner.executor.v1.QueryResult.Builder.class); + } + + private int bitField0_; + public static final int ROW_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List row_; + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + @java.lang.Override + public java.util.List getRowList() { + return row_; + } + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + @java.lang.Override + public java.util.List + getRowOrBuilderList() { + return row_; + } + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + @java.lang.Override + public int getRowCount() { + return row_.size(); + } + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueList getRow(int index) { + return row_.get(index); + } + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueListOrBuilder getRowOrBuilder(int index) { + return row_.get(index); + } + + public static final int ROW_TYPE_FIELD_NUMBER = 2; + private com.google.spanner.v1.StructType rowType_; + /** + * + * + *
+   * The type of rows read. It must be set if at least one row was read.
+   * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + * + * @return Whether the rowType field is set. + */ + @java.lang.Override + public boolean hasRowType() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The type of rows read. It must be set if at least one row was read.
+   * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + * + * @return The rowType. + */ + @java.lang.Override + public com.google.spanner.v1.StructType getRowType() { + return rowType_ == null ? com.google.spanner.v1.StructType.getDefaultInstance() : rowType_; + } + /** + * + * + *
+   * The type of rows read. It must be set if at least one row was read.
+   * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + */ + @java.lang.Override + public com.google.spanner.v1.StructTypeOrBuilder getRowTypeOrBuilder() { + return rowType_ == null ? com.google.spanner.v1.StructType.getDefaultInstance() : rowType_; + } + + 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 < row_.size(); i++) { + output.writeMessage(1, row_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRowType()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < row_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, row_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRowType()); + } + 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.executor.v1.QueryResult)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.QueryResult other = + (com.google.spanner.executor.v1.QueryResult) obj; + + if (!getRowList().equals(other.getRowList())) return false; + if (hasRowType() != other.hasRowType()) return false; + if (hasRowType()) { + if (!getRowType().equals(other.getRowType())) 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 (getRowCount() > 0) { + hash = (37 * hash) + ROW_FIELD_NUMBER; + hash = (53 * hash) + getRowList().hashCode(); + } + if (hasRowType()) { + hash = (37 * hash) + ROW_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getRowType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.QueryResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.QueryResult 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.executor.v1.QueryResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.QueryResult 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.executor.v1.QueryResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.QueryResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.QueryResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.QueryResult 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.executor.v1.QueryResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.QueryResult 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.executor.v1.QueryResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.QueryResult 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.executor.v1.QueryResult 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; + } + /** + * + * + *
+   * QueryResult contains result of a Query.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.QueryResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.QueryResult) + com.google.spanner.executor.v1.QueryResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.QueryResult.class, + com.google.spanner.executor.v1.QueryResult.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.QueryResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRowFieldBuilder(); + getRowTypeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rowBuilder_ == null) { + row_ = java.util.Collections.emptyList(); + } else { + row_ = null; + rowBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + rowType_ = null; + if (rowTypeBuilder_ != null) { + rowTypeBuilder_.dispose(); + rowTypeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_QueryResult_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.QueryResult getDefaultInstanceForType() { + return com.google.spanner.executor.v1.QueryResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.QueryResult build() { + com.google.spanner.executor.v1.QueryResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.QueryResult buildPartial() { + com.google.spanner.executor.v1.QueryResult result = + new com.google.spanner.executor.v1.QueryResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.executor.v1.QueryResult result) { + if (rowBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + row_ = java.util.Collections.unmodifiableList(row_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.row_ = row_; + } else { + result.row_ = rowBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.QueryResult result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rowType_ = rowTypeBuilder_ == null ? rowType_ : rowTypeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_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.executor.v1.QueryResult) { + return mergeFrom((com.google.spanner.executor.v1.QueryResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.QueryResult other) { + if (other == com.google.spanner.executor.v1.QueryResult.getDefaultInstance()) return this; + if (rowBuilder_ == null) { + if (!other.row_.isEmpty()) { + if (row_.isEmpty()) { + row_ = other.row_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRowIsMutable(); + row_.addAll(other.row_); + } + onChanged(); + } + } else { + if (!other.row_.isEmpty()) { + if (rowBuilder_.isEmpty()) { + rowBuilder_.dispose(); + rowBuilder_ = null; + row_ = other.row_; + bitField0_ = (bitField0_ & ~0x00000001); + rowBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRowFieldBuilder() + : null; + } else { + rowBuilder_.addAllMessages(other.row_); + } + } + } + if (other.hasRowType()) { + mergeRowType(other.getRowType()); + } + 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.executor.v1.ValueList m = + input.readMessage( + com.google.spanner.executor.v1.ValueList.parser(), extensionRegistry); + if (rowBuilder_ == null) { + ensureRowIsMutable(); + row_.add(m); + } else { + rowBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getRowTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 row_ = + java.util.Collections.emptyList(); + + private void ensureRowIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + row_ = new java.util.ArrayList(row_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + rowBuilder_; + + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public java.util.List getRowList() { + if (rowBuilder_ == null) { + return java.util.Collections.unmodifiableList(row_); + } else { + return rowBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public int getRowCount() { + if (rowBuilder_ == null) { + return row_.size(); + } else { + return rowBuilder_.getCount(); + } + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public com.google.spanner.executor.v1.ValueList getRow(int index) { + if (rowBuilder_ == null) { + return row_.get(index); + } else { + return rowBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public Builder setRow(int index, com.google.spanner.executor.v1.ValueList value) { + if (rowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowIsMutable(); + row_.set(index, value); + onChanged(); + } else { + rowBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public Builder setRow( + int index, com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (rowBuilder_ == null) { + ensureRowIsMutable(); + row_.set(index, builderForValue.build()); + onChanged(); + } else { + rowBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public Builder addRow(com.google.spanner.executor.v1.ValueList value) { + if (rowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowIsMutable(); + row_.add(value); + onChanged(); + } else { + rowBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public Builder addRow(int index, com.google.spanner.executor.v1.ValueList value) { + if (rowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowIsMutable(); + row_.add(index, value); + onChanged(); + } else { + rowBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public Builder addRow(com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (rowBuilder_ == null) { + ensureRowIsMutable(); + row_.add(builderForValue.build()); + onChanged(); + } else { + rowBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public Builder addRow( + int index, com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (rowBuilder_ == null) { + ensureRowIsMutable(); + row_.add(index, builderForValue.build()); + onChanged(); + } else { + rowBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public Builder addAllRow( + java.lang.Iterable values) { + if (rowBuilder_ == null) { + ensureRowIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, row_); + onChanged(); + } else { + rowBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public Builder clearRow() { + if (rowBuilder_ == null) { + row_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rowBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public Builder removeRow(int index) { + if (rowBuilder_ == null) { + ensureRowIsMutable(); + row_.remove(index); + onChanged(); + } else { + rowBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public com.google.spanner.executor.v1.ValueList.Builder getRowBuilder(int index) { + return getRowFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public com.google.spanner.executor.v1.ValueListOrBuilder getRowOrBuilder(int index) { + if (rowBuilder_ == null) { + return row_.get(index); + } else { + return rowBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public java.util.List + getRowOrBuilderList() { + if (rowBuilder_ != null) { + return rowBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(row_); + } + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public com.google.spanner.executor.v1.ValueList.Builder addRowBuilder() { + return getRowFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.ValueList.getDefaultInstance()); + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public com.google.spanner.executor.v1.ValueList.Builder addRowBuilder(int index) { + return getRowFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.ValueList.getDefaultInstance()); + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + public java.util.List getRowBuilderList() { + return getRowFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + getRowFieldBuilder() { + if (rowBuilder_ == null) { + rowBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder>( + row_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + row_ = null; + } + return rowBuilder_; + } + + private com.google.spanner.v1.StructType rowType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.StructType, + com.google.spanner.v1.StructType.Builder, + com.google.spanner.v1.StructTypeOrBuilder> + rowTypeBuilder_; + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + * + * @return Whether the rowType field is set. + */ + public boolean hasRowType() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + * + * @return The rowType. + */ + public com.google.spanner.v1.StructType getRowType() { + if (rowTypeBuilder_ == null) { + return rowType_ == null ? com.google.spanner.v1.StructType.getDefaultInstance() : rowType_; + } else { + return rowTypeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + */ + public Builder setRowType(com.google.spanner.v1.StructType value) { + if (rowTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rowType_ = value; + } else { + rowTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + */ + public Builder setRowType(com.google.spanner.v1.StructType.Builder builderForValue) { + if (rowTypeBuilder_ == null) { + rowType_ = builderForValue.build(); + } else { + rowTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + */ + public Builder mergeRowType(com.google.spanner.v1.StructType value) { + if (rowTypeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && rowType_ != null + && rowType_ != com.google.spanner.v1.StructType.getDefaultInstance()) { + getRowTypeBuilder().mergeFrom(value); + } else { + rowType_ = value; + } + } else { + rowTypeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + */ + public Builder clearRowType() { + bitField0_ = (bitField0_ & ~0x00000002); + rowType_ = null; + if (rowTypeBuilder_ != null) { + rowTypeBuilder_.dispose(); + rowTypeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + */ + public com.google.spanner.v1.StructType.Builder getRowTypeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRowTypeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + */ + public com.google.spanner.v1.StructTypeOrBuilder getRowTypeOrBuilder() { + if (rowTypeBuilder_ != null) { + return rowTypeBuilder_.getMessageOrBuilder(); + } else { + return rowType_ == null ? com.google.spanner.v1.StructType.getDefaultInstance() : rowType_; + } + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.StructType, + com.google.spanner.v1.StructType.Builder, + com.google.spanner.v1.StructTypeOrBuilder> + getRowTypeFieldBuilder() { + if (rowTypeBuilder_ == null) { + rowTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.StructType, + com.google.spanner.v1.StructType.Builder, + com.google.spanner.v1.StructTypeOrBuilder>( + getRowType(), getParentForChildren(), isClean()); + rowType_ = null; + } + return rowTypeBuilder_; + } + + @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.executor.v1.QueryResult) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.QueryResult) + private static final com.google.spanner.executor.v1.QueryResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.QueryResult(); + } + + public static com.google.spanner.executor.v1.QueryResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryResult 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.executor.v1.QueryResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryResultOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryResultOrBuilder.java new file mode 100644 index 00000000000..f70058d2505 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/QueryResultOrBuilder.java @@ -0,0 +1,116 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface QueryResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.QueryResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + java.util.List getRowList(); + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + com.google.spanner.executor.v1.ValueList getRow(int index); + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + int getRowCount(); + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + java.util.List getRowOrBuilderList(); + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 1; + */ + com.google.spanner.executor.v1.ValueListOrBuilder getRowOrBuilder(int index); + + /** + * + * + *
+   * The type of rows read. It must be set if at least one row was read.
+   * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + * + * @return Whether the rowType field is set. + */ + boolean hasRowType(); + /** + * + * + *
+   * The type of rows read. It must be set if at least one row was read.
+   * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + * + * @return The rowType. + */ + com.google.spanner.v1.StructType getRowType(); + /** + * + * + *
+   * The type of rows read. It must be set if at least one row was read.
+   * 
+ * + * optional .google.spanner.v1.StructType row_type = 2; + */ + com.google.spanner.v1.StructTypeOrBuilder getRowTypeOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReadAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReadAction.java new file mode 100644 index 00000000000..78eb70bec94 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReadAction.java @@ -0,0 +1,1469 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * A single read request.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ReadAction} + */ +public final class ReadAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ReadAction) + ReadActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReadAction.newBuilder() to construct. + private ReadAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReadAction() { + table_ = ""; + index_ = ""; + column_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReadAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReadAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReadAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ReadAction.class, + com.google.spanner.executor.v1.ReadAction.Builder.class); + } + + private int bitField0_; + public static final int TABLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object table_ = ""; + /** + * + * + *
+   * The table to read at.
+   * 
+ * + * string table = 1; + * + * @return The table. + */ + @java.lang.Override + public java.lang.String getTable() { + java.lang.Object ref = table_; + 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(); + table_ = s; + return s; + } + } + /** + * + * + *
+   * The table to read at.
+   * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object index_ = ""; + /** + * + * + *
+   * The index to read at if it's an index read.
+   * 
+ * + * optional string index = 2; + * + * @return Whether the index field is set. + */ + @java.lang.Override + public boolean hasIndex() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The index to read at if it's an index read.
+   * 
+ * + * optional string index = 2; + * + * @return The index. + */ + @java.lang.Override + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * The index to read at if it's an index read.
+   * 
+ * + * optional string index = 2; + * + * @return The bytes for index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLUMN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList column_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * List of columns must begin with the key columns used for the read.
+   * 
+ * + * repeated string column = 3; + * + * @return A list containing the column. + */ + public com.google.protobuf.ProtocolStringList getColumnList() { + return column_; + } + /** + * + * + *
+   * List of columns must begin with the key columns used for the read.
+   * 
+ * + * repeated string column = 3; + * + * @return The count of column. + */ + public int getColumnCount() { + return column_.size(); + } + /** + * + * + *
+   * List of columns must begin with the key columns used for the read.
+   * 
+ * + * repeated string column = 3; + * + * @param index The index of the element to return. + * @return The column at the given index. + */ + public java.lang.String getColumn(int index) { + return column_.get(index); + } + /** + * + * + *
+   * List of columns must begin with the key columns used for the read.
+   * 
+ * + * repeated string column = 3; + * + * @param index The index of the value to return. + * @return The bytes of the column at the given index. + */ + public com.google.protobuf.ByteString getColumnBytes(int index) { + return column_.getByteString(index); + } + + public static final int KEYS_FIELD_NUMBER = 4; + private com.google.spanner.executor.v1.KeySet keys_; + /** + * + * + *
+   * Keys for performing this read.
+   * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + * + * @return Whether the keys field is set. + */ + @java.lang.Override + public boolean hasKeys() { + return keys_ != null; + } + /** + * + * + *
+   * Keys for performing this read.
+   * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + * + * @return The keys. + */ + @java.lang.Override + public com.google.spanner.executor.v1.KeySet getKeys() { + return keys_ == null ? com.google.spanner.executor.v1.KeySet.getDefaultInstance() : keys_; + } + /** + * + * + *
+   * Keys for performing this read.
+   * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + */ + @java.lang.Override + public com.google.spanner.executor.v1.KeySetOrBuilder getKeysOrBuilder() { + return keys_ == null ? com.google.spanner.executor.v1.KeySet.getDefaultInstance() : keys_; + } + + public static final int LIMIT_FIELD_NUMBER = 5; + private int limit_ = 0; + /** + * + * + *
+   * Limit on number of rows to read. If set, must be positive.
+   * 
+ * + * int32 limit = 5; + * + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + + 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(table_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, table_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, index_); + } + for (int i = 0; i < column_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, column_.getRaw(i)); + } + if (keys_ != null) { + output.writeMessage(4, getKeys()); + } + if (limit_ != 0) { + output.writeInt32(5, limit_); + } + 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(table_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, index_); + } + { + int dataSize = 0; + for (int i = 0; i < column_.size(); i++) { + dataSize += computeStringSizeNoTag(column_.getRaw(i)); + } + size += dataSize; + size += 1 * getColumnList().size(); + } + if (keys_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getKeys()); + } + if (limit_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, limit_); + } + 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.executor.v1.ReadAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ReadAction other = + (com.google.spanner.executor.v1.ReadAction) obj; + + if (!getTable().equals(other.getTable())) return false; + if (hasIndex() != other.hasIndex()) return false; + if (hasIndex()) { + if (!getIndex().equals(other.getIndex())) return false; + } + if (!getColumnList().equals(other.getColumnList())) return false; + if (hasKeys() != other.hasKeys()) return false; + if (hasKeys()) { + if (!getKeys().equals(other.getKeys())) return false; + } + if (getLimit() != other.getLimit()) 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) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + if (hasIndex()) { + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + } + if (getColumnCount() > 0) { + hash = (37 * hash) + COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getColumnList().hashCode(); + } + if (hasKeys()) { + hash = (37 * hash) + KEYS_FIELD_NUMBER; + hash = (53 * hash) + getKeys().hashCode(); + } + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ReadAction parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ReadAction 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.executor.v1.ReadAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ReadAction 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.executor.v1.ReadAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ReadAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ReadAction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ReadAction 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.executor.v1.ReadAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ReadAction 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.executor.v1.ReadAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ReadAction 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.executor.v1.ReadAction 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 single read request.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ReadAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ReadAction) + com.google.spanner.executor.v1.ReadActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReadAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReadAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ReadAction.class, + com.google.spanner.executor.v1.ReadAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ReadAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + table_ = ""; + index_ = ""; + column_ = com.google.protobuf.LazyStringArrayList.emptyList(); + keys_ = null; + if (keysBuilder_ != null) { + keysBuilder_.dispose(); + keysBuilder_ = null; + } + limit_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReadAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ReadAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ReadAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ReadAction build() { + com.google.spanner.executor.v1.ReadAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ReadAction buildPartial() { + com.google.spanner.executor.v1.ReadAction result = + new com.google.spanner.executor.v1.ReadAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.ReadAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.table_ = table_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.index_ = index_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + column_.makeImmutable(); + result.column_ = column_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.keys_ = keysBuilder_ == null ? keys_ : keysBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.limit_ = limit_; + } + result.bitField0_ |= to_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.executor.v1.ReadAction) { + return mergeFrom((com.google.spanner.executor.v1.ReadAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ReadAction other) { + if (other == com.google.spanner.executor.v1.ReadAction.getDefaultInstance()) return this; + if (!other.getTable().isEmpty()) { + table_ = other.table_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasIndex()) { + index_ = other.index_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.column_.isEmpty()) { + if (column_.isEmpty()) { + column_ = other.column_; + bitField0_ |= 0x00000004; + } else { + ensureColumnIsMutable(); + column_.addAll(other.column_); + } + onChanged(); + } + if (other.hasKeys()) { + mergeKeys(other.getKeys()); + } + if (other.getLimit() != 0) { + setLimit(other.getLimit()); + } + 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: + { + table_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + index_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureColumnIsMutable(); + column_.add(s); + break; + } // case 26 + case 34: + { + input.readMessage(getKeysFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + limit_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + 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 table_ = ""; + /** + * + * + *
+     * The table to read at.
+     * 
+ * + * string table = 1; + * + * @return The table. + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The table to read at.
+     * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The table to read at.
+     * 
+ * + * string table = 1; + * + * @param value The table to set. + * @return This builder for chaining. + */ + public Builder setTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The table to read at.
+     * 
+ * + * string table = 1; + * + * @return This builder for chaining. + */ + public Builder clearTable() { + table_ = getDefaultInstance().getTable(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The table to read at.
+     * 
+ * + * string table = 1; + * + * @param value The bytes for table to set. + * @return This builder for chaining. + */ + public Builder setTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + table_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * The index to read at if it's an index read.
+     * 
+ * + * optional string index = 2; + * + * @return Whether the index field is set. + */ + public boolean hasIndex() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The index to read at if it's an index read.
+     * 
+ * + * optional string index = 2; + * + * @return The index. + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The index to read at if it's an index read.
+     * 
+ * + * optional string index = 2; + * + * @return The bytes for index. + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The index to read at if it's an index read.
+     * 
+ * + * optional string index = 2; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + index_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The index to read at if it's an index read.
+     * 
+ * + * optional string index = 2; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + index_ = getDefaultInstance().getIndex(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The index to read at if it's an index read.
+     * 
+ * + * optional string index = 2; + * + * @param value The bytes for index to set. + * @return This builder for chaining. + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + index_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList column_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureColumnIsMutable() { + if (!column_.isModifiable()) { + column_ = new com.google.protobuf.LazyStringArrayList(column_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * List of columns must begin with the key columns used for the read.
+     * 
+ * + * repeated string column = 3; + * + * @return A list containing the column. + */ + public com.google.protobuf.ProtocolStringList getColumnList() { + column_.makeImmutable(); + return column_; + } + /** + * + * + *
+     * List of columns must begin with the key columns used for the read.
+     * 
+ * + * repeated string column = 3; + * + * @return The count of column. + */ + public int getColumnCount() { + return column_.size(); + } + /** + * + * + *
+     * List of columns must begin with the key columns used for the read.
+     * 
+ * + * repeated string column = 3; + * + * @param index The index of the element to return. + * @return The column at the given index. + */ + public java.lang.String getColumn(int index) { + return column_.get(index); + } + /** + * + * + *
+     * List of columns must begin with the key columns used for the read.
+     * 
+ * + * repeated string column = 3; + * + * @param index The index of the value to return. + * @return The bytes of the column at the given index. + */ + public com.google.protobuf.ByteString getColumnBytes(int index) { + return column_.getByteString(index); + } + /** + * + * + *
+     * List of columns must begin with the key columns used for the read.
+     * 
+ * + * repeated string column = 3; + * + * @param index The index to set the value at. + * @param value The column to set. + * @return This builder for chaining. + */ + public Builder setColumn(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnIsMutable(); + column_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * List of columns must begin with the key columns used for the read.
+     * 
+ * + * repeated string column = 3; + * + * @param value The column to add. + * @return This builder for chaining. + */ + public Builder addColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnIsMutable(); + column_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * List of columns must begin with the key columns used for the read.
+     * 
+ * + * repeated string column = 3; + * + * @param values The column to add. + * @return This builder for chaining. + */ + public Builder addAllColumn(java.lang.Iterable values) { + ensureColumnIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, column_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * List of columns must begin with the key columns used for the read.
+     * 
+ * + * repeated string column = 3; + * + * @return This builder for chaining. + */ + public Builder clearColumn() { + column_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * List of columns must begin with the key columns used for the read.
+     * 
+ * + * repeated string column = 3; + * + * @param value The bytes of the column to add. + * @return This builder for chaining. + */ + public Builder addColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureColumnIsMutable(); + column_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.spanner.executor.v1.KeySet keys_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.KeySet, + com.google.spanner.executor.v1.KeySet.Builder, + com.google.spanner.executor.v1.KeySetOrBuilder> + keysBuilder_; + /** + * + * + *
+     * Keys for performing this read.
+     * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + * + * @return Whether the keys field is set. + */ + public boolean hasKeys() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Keys for performing this read.
+     * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + * + * @return The keys. + */ + public com.google.spanner.executor.v1.KeySet getKeys() { + if (keysBuilder_ == null) { + return keys_ == null ? com.google.spanner.executor.v1.KeySet.getDefaultInstance() : keys_; + } else { + return keysBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Keys for performing this read.
+     * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + */ + public Builder setKeys(com.google.spanner.executor.v1.KeySet value) { + if (keysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keys_ = value; + } else { + keysBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Keys for performing this read.
+     * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + */ + public Builder setKeys(com.google.spanner.executor.v1.KeySet.Builder builderForValue) { + if (keysBuilder_ == null) { + keys_ = builderForValue.build(); + } else { + keysBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Keys for performing this read.
+     * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + */ + public Builder mergeKeys(com.google.spanner.executor.v1.KeySet value) { + if (keysBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && keys_ != null + && keys_ != com.google.spanner.executor.v1.KeySet.getDefaultInstance()) { + getKeysBuilder().mergeFrom(value); + } else { + keys_ = value; + } + } else { + keysBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Keys for performing this read.
+     * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + */ + public Builder clearKeys() { + bitField0_ = (bitField0_ & ~0x00000008); + keys_ = null; + if (keysBuilder_ != null) { + keysBuilder_.dispose(); + keysBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Keys for performing this read.
+     * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + */ + public com.google.spanner.executor.v1.KeySet.Builder getKeysBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getKeysFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Keys for performing this read.
+     * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + */ + public com.google.spanner.executor.v1.KeySetOrBuilder getKeysOrBuilder() { + if (keysBuilder_ != null) { + return keysBuilder_.getMessageOrBuilder(); + } else { + return keys_ == null ? com.google.spanner.executor.v1.KeySet.getDefaultInstance() : keys_; + } + } + /** + * + * + *
+     * Keys for performing this read.
+     * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.KeySet, + com.google.spanner.executor.v1.KeySet.Builder, + com.google.spanner.executor.v1.KeySetOrBuilder> + getKeysFieldBuilder() { + if (keysBuilder_ == null) { + keysBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.KeySet, + com.google.spanner.executor.v1.KeySet.Builder, + com.google.spanner.executor.v1.KeySetOrBuilder>( + getKeys(), getParentForChildren(), isClean()); + keys_ = null; + } + return keysBuilder_; + } + + private int limit_; + /** + * + * + *
+     * Limit on number of rows to read. If set, must be positive.
+     * 
+ * + * int32 limit = 5; + * + * @return The limit. + */ + @java.lang.Override + public int getLimit() { + return limit_; + } + /** + * + * + *
+     * Limit on number of rows to read. If set, must be positive.
+     * 
+ * + * int32 limit = 5; + * + * @param value The limit to set. + * @return This builder for chaining. + */ + public Builder setLimit(int value) { + + limit_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Limit on number of rows to read. If set, must be positive.
+     * 
+ * + * int32 limit = 5; + * + * @return This builder for chaining. + */ + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000010); + limit_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.ReadAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ReadAction) + private static final com.google.spanner.executor.v1.ReadAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ReadAction(); + } + + public static com.google.spanner.executor.v1.ReadAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadAction 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.executor.v1.ReadAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReadActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReadActionOrBuilder.java new file mode 100644 index 00000000000..10caf502805 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReadActionOrBuilder.java @@ -0,0 +1,186 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ReadActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ReadAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The table to read at.
+   * 
+ * + * string table = 1; + * + * @return The table. + */ + java.lang.String getTable(); + /** + * + * + *
+   * The table to read at.
+   * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + com.google.protobuf.ByteString getTableBytes(); + + /** + * + * + *
+   * The index to read at if it's an index read.
+   * 
+ * + * optional string index = 2; + * + * @return Whether the index field is set. + */ + boolean hasIndex(); + /** + * + * + *
+   * The index to read at if it's an index read.
+   * 
+ * + * optional string index = 2; + * + * @return The index. + */ + java.lang.String getIndex(); + /** + * + * + *
+   * The index to read at if it's an index read.
+   * 
+ * + * optional string index = 2; + * + * @return The bytes for index. + */ + com.google.protobuf.ByteString getIndexBytes(); + + /** + * + * + *
+   * List of columns must begin with the key columns used for the read.
+   * 
+ * + * repeated string column = 3; + * + * @return A list containing the column. + */ + java.util.List getColumnList(); + /** + * + * + *
+   * List of columns must begin with the key columns used for the read.
+   * 
+ * + * repeated string column = 3; + * + * @return The count of column. + */ + int getColumnCount(); + /** + * + * + *
+   * List of columns must begin with the key columns used for the read.
+   * 
+ * + * repeated string column = 3; + * + * @param index The index of the element to return. + * @return The column at the given index. + */ + java.lang.String getColumn(int index); + /** + * + * + *
+   * List of columns must begin with the key columns used for the read.
+   * 
+ * + * repeated string column = 3; + * + * @param index The index of the value to return. + * @return The bytes of the column at the given index. + */ + com.google.protobuf.ByteString getColumnBytes(int index); + + /** + * + * + *
+   * Keys for performing this read.
+   * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + * + * @return Whether the keys field is set. + */ + boolean hasKeys(); + /** + * + * + *
+   * Keys for performing this read.
+   * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + * + * @return The keys. + */ + com.google.spanner.executor.v1.KeySet getKeys(); + /** + * + * + *
+   * Keys for performing this read.
+   * 
+ * + * .google.spanner.executor.v1.KeySet keys = 4; + */ + com.google.spanner.executor.v1.KeySetOrBuilder getKeysOrBuilder(); + + /** + * + * + *
+   * Limit on number of rows to read. If set, must be positive.
+   * 
+ * + * int32 limit = 5; + * + * @return The limit. + */ + int getLimit(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReadResult.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReadResult.java new file mode 100644 index 00000000000..a3f95026a08 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReadResult.java @@ -0,0 +1,1753 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * ReadResult contains rows read.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ReadResult} + */ +public final class ReadResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ReadResult) + ReadResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReadResult.newBuilder() to construct. + private ReadResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReadResult() { + table_ = ""; + index_ = ""; + row_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReadResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReadResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReadResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ReadResult.class, + com.google.spanner.executor.v1.ReadResult.Builder.class); + } + + private int bitField0_; + public static final int TABLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object table_ = ""; + /** + * + * + *
+   * Table name.
+   * 
+ * + * string table = 1; + * + * @return The table. + */ + @java.lang.Override + public java.lang.String getTable() { + java.lang.Object ref = table_; + 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(); + table_ = s; + return s; + } + } + /** + * + * + *
+   * Table name.
+   * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object index_ = ""; + /** + * + * + *
+   * Index name, if read from an index.
+   * 
+ * + * optional string index = 2; + * + * @return Whether the index field is set. + */ + @java.lang.Override + public boolean hasIndex() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Index name, if read from an index.
+   * 
+ * + * optional string index = 2; + * + * @return The index. + */ + @java.lang.Override + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * Index name, if read from an index.
+   * 
+ * + * optional string index = 2; + * + * @return The bytes for index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_INDEX_FIELD_NUMBER = 3; + private int requestIndex_ = 0; + /** + * + * + *
+   * Request index (multiread only).
+   * 
+ * + * optional int32 request_index = 3; + * + * @return Whether the requestIndex field is set. + */ + @java.lang.Override + public boolean hasRequestIndex() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Request index (multiread only).
+   * 
+ * + * optional int32 request_index = 3; + * + * @return The requestIndex. + */ + @java.lang.Override + public int getRequestIndex() { + return requestIndex_; + } + + public static final int ROW_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List row_; + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + @java.lang.Override + public java.util.List getRowList() { + return row_; + } + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + @java.lang.Override + public java.util.List + getRowOrBuilderList() { + return row_; + } + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + @java.lang.Override + public int getRowCount() { + return row_.size(); + } + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueList getRow(int index) { + return row_.get(index); + } + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueListOrBuilder getRowOrBuilder(int index) { + return row_.get(index); + } + + public static final int ROW_TYPE_FIELD_NUMBER = 5; + private com.google.spanner.v1.StructType rowType_; + /** + * + * + *
+   * The type of rows read. It must be set if at least one row was read.
+   * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + * + * @return Whether the rowType field is set. + */ + @java.lang.Override + public boolean hasRowType() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The type of rows read. It must be set if at least one row was read.
+   * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + * + * @return The rowType. + */ + @java.lang.Override + public com.google.spanner.v1.StructType getRowType() { + return rowType_ == null ? com.google.spanner.v1.StructType.getDefaultInstance() : rowType_; + } + /** + * + * + *
+   * The type of rows read. It must be set if at least one row was read.
+   * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + */ + @java.lang.Override + public com.google.spanner.v1.StructTypeOrBuilder getRowTypeOrBuilder() { + return rowType_ == null ? com.google.spanner.v1.StructType.getDefaultInstance() : rowType_; + } + + 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(table_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, table_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, index_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(3, requestIndex_); + } + for (int i = 0; i < row_.size(); i++) { + output.writeMessage(4, row_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getRowType()); + } + 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(table_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, index_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, requestIndex_); + } + for (int i = 0; i < row_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, row_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRowType()); + } + 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.executor.v1.ReadResult)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ReadResult other = + (com.google.spanner.executor.v1.ReadResult) obj; + + if (!getTable().equals(other.getTable())) return false; + if (hasIndex() != other.hasIndex()) return false; + if (hasIndex()) { + if (!getIndex().equals(other.getIndex())) return false; + } + if (hasRequestIndex() != other.hasRequestIndex()) return false; + if (hasRequestIndex()) { + if (getRequestIndex() != other.getRequestIndex()) return false; + } + if (!getRowList().equals(other.getRowList())) return false; + if (hasRowType() != other.hasRowType()) return false; + if (hasRowType()) { + if (!getRowType().equals(other.getRowType())) 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) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + if (hasIndex()) { + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + } + if (hasRequestIndex()) { + hash = (37 * hash) + REQUEST_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getRequestIndex(); + } + if (getRowCount() > 0) { + hash = (37 * hash) + ROW_FIELD_NUMBER; + hash = (53 * hash) + getRowList().hashCode(); + } + if (hasRowType()) { + hash = (37 * hash) + ROW_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getRowType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ReadResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ReadResult 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.executor.v1.ReadResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ReadResult 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.executor.v1.ReadResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ReadResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ReadResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ReadResult 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.executor.v1.ReadResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ReadResult 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.executor.v1.ReadResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ReadResult 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.executor.v1.ReadResult 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; + } + /** + * + * + *
+   * ReadResult contains rows read.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ReadResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ReadResult) + com.google.spanner.executor.v1.ReadResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReadResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReadResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ReadResult.class, + com.google.spanner.executor.v1.ReadResult.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ReadResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRowFieldBuilder(); + getRowTypeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + table_ = ""; + index_ = ""; + requestIndex_ = 0; + if (rowBuilder_ == null) { + row_ = java.util.Collections.emptyList(); + } else { + row_ = null; + rowBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + rowType_ = null; + if (rowTypeBuilder_ != null) { + rowTypeBuilder_.dispose(); + rowTypeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReadResult_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ReadResult getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ReadResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ReadResult build() { + com.google.spanner.executor.v1.ReadResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ReadResult buildPartial() { + com.google.spanner.executor.v1.ReadResult result = + new com.google.spanner.executor.v1.ReadResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.executor.v1.ReadResult result) { + if (rowBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + row_ = java.util.Collections.unmodifiableList(row_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.row_ = row_; + } else { + result.row_ = rowBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.ReadResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.table_ = table_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.index_ = index_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestIndex_ = requestIndex_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.rowType_ = rowTypeBuilder_ == null ? rowType_ : rowTypeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_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.executor.v1.ReadResult) { + return mergeFrom((com.google.spanner.executor.v1.ReadResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ReadResult other) { + if (other == com.google.spanner.executor.v1.ReadResult.getDefaultInstance()) return this; + if (!other.getTable().isEmpty()) { + table_ = other.table_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasIndex()) { + index_ = other.index_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasRequestIndex()) { + setRequestIndex(other.getRequestIndex()); + } + if (rowBuilder_ == null) { + if (!other.row_.isEmpty()) { + if (row_.isEmpty()) { + row_ = other.row_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureRowIsMutable(); + row_.addAll(other.row_); + } + onChanged(); + } + } else { + if (!other.row_.isEmpty()) { + if (rowBuilder_.isEmpty()) { + rowBuilder_.dispose(); + rowBuilder_ = null; + row_ = other.row_; + bitField0_ = (bitField0_ & ~0x00000008); + rowBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRowFieldBuilder() + : null; + } else { + rowBuilder_.addAllMessages(other.row_); + } + } + } + if (other.hasRowType()) { + mergeRowType(other.getRowType()); + } + 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: + { + table_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + index_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + requestIndex_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + com.google.spanner.executor.v1.ValueList m = + input.readMessage( + com.google.spanner.executor.v1.ValueList.parser(), extensionRegistry); + if (rowBuilder_ == null) { + ensureRowIsMutable(); + row_.add(m); + } else { + rowBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage(getRowTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 table_ = ""; + /** + * + * + *
+     * Table name.
+     * 
+ * + * string table = 1; + * + * @return The table. + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Table name.
+     * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Table name.
+     * 
+ * + * string table = 1; + * + * @param value The table to set. + * @return This builder for chaining. + */ + public Builder setTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Table name.
+     * 
+ * + * string table = 1; + * + * @return This builder for chaining. + */ + public Builder clearTable() { + table_ = getDefaultInstance().getTable(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Table name.
+     * 
+ * + * string table = 1; + * + * @param value The bytes for table to set. + * @return This builder for chaining. + */ + public Builder setTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + table_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * Index name, if read from an index.
+     * 
+ * + * optional string index = 2; + * + * @return Whether the index field is set. + */ + public boolean hasIndex() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Index name, if read from an index.
+     * 
+ * + * optional string index = 2; + * + * @return The index. + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Index name, if read from an index.
+     * 
+ * + * optional string index = 2; + * + * @return The bytes for index. + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Index name, if read from an index.
+     * 
+ * + * optional string index = 2; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + index_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Index name, if read from an index.
+     * 
+ * + * optional string index = 2; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + index_ = getDefaultInstance().getIndex(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Index name, if read from an index.
+     * 
+ * + * optional string index = 2; + * + * @param value The bytes for index to set. + * @return This builder for chaining. + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + index_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int requestIndex_; + /** + * + * + *
+     * Request index (multiread only).
+     * 
+ * + * optional int32 request_index = 3; + * + * @return Whether the requestIndex field is set. + */ + @java.lang.Override + public boolean hasRequestIndex() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Request index (multiread only).
+     * 
+ * + * optional int32 request_index = 3; + * + * @return The requestIndex. + */ + @java.lang.Override + public int getRequestIndex() { + return requestIndex_; + } + /** + * + * + *
+     * Request index (multiread only).
+     * 
+ * + * optional int32 request_index = 3; + * + * @param value The requestIndex to set. + * @return This builder for chaining. + */ + public Builder setRequestIndex(int value) { + + requestIndex_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Request index (multiread only).
+     * 
+ * + * optional int32 request_index = 3; + * + * @return This builder for chaining. + */ + public Builder clearRequestIndex() { + bitField0_ = (bitField0_ & ~0x00000004); + requestIndex_ = 0; + onChanged(); + return this; + } + + private java.util.List row_ = + java.util.Collections.emptyList(); + + private void ensureRowIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + row_ = new java.util.ArrayList(row_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + rowBuilder_; + + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public java.util.List getRowList() { + if (rowBuilder_ == null) { + return java.util.Collections.unmodifiableList(row_); + } else { + return rowBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public int getRowCount() { + if (rowBuilder_ == null) { + return row_.size(); + } else { + return rowBuilder_.getCount(); + } + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public com.google.spanner.executor.v1.ValueList getRow(int index) { + if (rowBuilder_ == null) { + return row_.get(index); + } else { + return rowBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public Builder setRow(int index, com.google.spanner.executor.v1.ValueList value) { + if (rowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowIsMutable(); + row_.set(index, value); + onChanged(); + } else { + rowBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public Builder setRow( + int index, com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (rowBuilder_ == null) { + ensureRowIsMutable(); + row_.set(index, builderForValue.build()); + onChanged(); + } else { + rowBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public Builder addRow(com.google.spanner.executor.v1.ValueList value) { + if (rowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowIsMutable(); + row_.add(value); + onChanged(); + } else { + rowBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public Builder addRow(int index, com.google.spanner.executor.v1.ValueList value) { + if (rowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowIsMutable(); + row_.add(index, value); + onChanged(); + } else { + rowBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public Builder addRow(com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (rowBuilder_ == null) { + ensureRowIsMutable(); + row_.add(builderForValue.build()); + onChanged(); + } else { + rowBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public Builder addRow( + int index, com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (rowBuilder_ == null) { + ensureRowIsMutable(); + row_.add(index, builderForValue.build()); + onChanged(); + } else { + rowBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public Builder addAllRow( + java.lang.Iterable values) { + if (rowBuilder_ == null) { + ensureRowIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, row_); + onChanged(); + } else { + rowBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public Builder clearRow() { + if (rowBuilder_ == null) { + row_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + rowBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public Builder removeRow(int index) { + if (rowBuilder_ == null) { + ensureRowIsMutable(); + row_.remove(index); + onChanged(); + } else { + rowBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public com.google.spanner.executor.v1.ValueList.Builder getRowBuilder(int index) { + return getRowFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public com.google.spanner.executor.v1.ValueListOrBuilder getRowOrBuilder(int index) { + if (rowBuilder_ == null) { + return row_.get(index); + } else { + return rowBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public java.util.List + getRowOrBuilderList() { + if (rowBuilder_ != null) { + return rowBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(row_); + } + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public com.google.spanner.executor.v1.ValueList.Builder addRowBuilder() { + return getRowFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.ValueList.getDefaultInstance()); + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public com.google.spanner.executor.v1.ValueList.Builder addRowBuilder(int index) { + return getRowFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.ValueList.getDefaultInstance()); + } + /** + * + * + *
+     * Rows read. Each row is a struct with multiple fields, one for each column
+     * in read result. All rows have the same type.
+     * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + public java.util.List getRowBuilderList() { + return getRowFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + getRowFieldBuilder() { + if (rowBuilder_ == null) { + rowBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder>( + row_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + row_ = null; + } + return rowBuilder_; + } + + private com.google.spanner.v1.StructType rowType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.StructType, + com.google.spanner.v1.StructType.Builder, + com.google.spanner.v1.StructTypeOrBuilder> + rowTypeBuilder_; + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + * + * @return Whether the rowType field is set. + */ + public boolean hasRowType() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + * + * @return The rowType. + */ + public com.google.spanner.v1.StructType getRowType() { + if (rowTypeBuilder_ == null) { + return rowType_ == null ? com.google.spanner.v1.StructType.getDefaultInstance() : rowType_; + } else { + return rowTypeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + */ + public Builder setRowType(com.google.spanner.v1.StructType value) { + if (rowTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rowType_ = value; + } else { + rowTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + */ + public Builder setRowType(com.google.spanner.v1.StructType.Builder builderForValue) { + if (rowTypeBuilder_ == null) { + rowType_ = builderForValue.build(); + } else { + rowTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + */ + public Builder mergeRowType(com.google.spanner.v1.StructType value) { + if (rowTypeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && rowType_ != null + && rowType_ != com.google.spanner.v1.StructType.getDefaultInstance()) { + getRowTypeBuilder().mergeFrom(value); + } else { + rowType_ = value; + } + } else { + rowTypeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + */ + public Builder clearRowType() { + bitField0_ = (bitField0_ & ~0x00000010); + rowType_ = null; + if (rowTypeBuilder_ != null) { + rowTypeBuilder_.dispose(); + rowTypeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + */ + public com.google.spanner.v1.StructType.Builder getRowTypeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getRowTypeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + */ + public com.google.spanner.v1.StructTypeOrBuilder getRowTypeOrBuilder() { + if (rowTypeBuilder_ != null) { + return rowTypeBuilder_.getMessageOrBuilder(); + } else { + return rowType_ == null ? com.google.spanner.v1.StructType.getDefaultInstance() : rowType_; + } + } + /** + * + * + *
+     * The type of rows read. It must be set if at least one row was read.
+     * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.StructType, + com.google.spanner.v1.StructType.Builder, + com.google.spanner.v1.StructTypeOrBuilder> + getRowTypeFieldBuilder() { + if (rowTypeBuilder_ == null) { + rowTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.StructType, + com.google.spanner.v1.StructType.Builder, + com.google.spanner.v1.StructTypeOrBuilder>( + getRowType(), getParentForChildren(), isClean()); + rowType_ = null; + } + return rowTypeBuilder_; + } + + @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.executor.v1.ReadResult) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ReadResult) + private static final com.google.spanner.executor.v1.ReadResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ReadResult(); + } + + public static com.google.spanner.executor.v1.ReadResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadResult 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.executor.v1.ReadResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReadResultOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReadResultOrBuilder.java new file mode 100644 index 00000000000..776a79a81be --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReadResultOrBuilder.java @@ -0,0 +1,203 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ReadResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ReadResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Table name.
+   * 
+ * + * string table = 1; + * + * @return The table. + */ + java.lang.String getTable(); + /** + * + * + *
+   * Table name.
+   * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + com.google.protobuf.ByteString getTableBytes(); + + /** + * + * + *
+   * Index name, if read from an index.
+   * 
+ * + * optional string index = 2; + * + * @return Whether the index field is set. + */ + boolean hasIndex(); + /** + * + * + *
+   * Index name, if read from an index.
+   * 
+ * + * optional string index = 2; + * + * @return The index. + */ + java.lang.String getIndex(); + /** + * + * + *
+   * Index name, if read from an index.
+   * 
+ * + * optional string index = 2; + * + * @return The bytes for index. + */ + com.google.protobuf.ByteString getIndexBytes(); + + /** + * + * + *
+   * Request index (multiread only).
+   * 
+ * + * optional int32 request_index = 3; + * + * @return Whether the requestIndex field is set. + */ + boolean hasRequestIndex(); + /** + * + * + *
+   * Request index (multiread only).
+   * 
+ * + * optional int32 request_index = 3; + * + * @return The requestIndex. + */ + int getRequestIndex(); + + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + java.util.List getRowList(); + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + com.google.spanner.executor.v1.ValueList getRow(int index); + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + int getRowCount(); + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + java.util.List getRowOrBuilderList(); + /** + * + * + *
+   * Rows read. Each row is a struct with multiple fields, one for each column
+   * in read result. All rows have the same type.
+   * 
+ * + * repeated .google.spanner.executor.v1.ValueList row = 4; + */ + com.google.spanner.executor.v1.ValueListOrBuilder getRowOrBuilder(int index); + + /** + * + * + *
+   * The type of rows read. It must be set if at least one row was read.
+   * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + * + * @return Whether the rowType field is set. + */ + boolean hasRowType(); + /** + * + * + *
+   * The type of rows read. It must be set if at least one row was read.
+   * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + * + * @return The rowType. + */ + com.google.spanner.v1.StructType getRowType(); + /** + * + * + *
+   * The type of rows read. It must be set if at least one row was read.
+   * 
+ * + * optional .google.spanner.v1.StructType row_type = 5; + */ + com.google.spanner.v1.StructTypeOrBuilder getRowTypeOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReconfigureCloudDatabaseAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReconfigureCloudDatabaseAction.java new file mode 100644 index 00000000000..9a4193791d0 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReconfigureCloudDatabaseAction.java @@ -0,0 +1,945 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that reconfigures a Cloud Spanner database.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ReconfigureCloudDatabaseAction} + */ +public final class ReconfigureCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ReconfigureCloudDatabaseAction) + ReconfigureCloudDatabaseActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReconfigureCloudDatabaseAction.newBuilder() to construct. + private ReconfigureCloudDatabaseAction( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReconfigureCloudDatabaseAction() { + databaseUri_ = ""; + servingLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReconfigureCloudDatabaseAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.class, + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder.class); + } + + private int bitField0_; + public static final int DATABASE_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseUri_ = ""; + /** + * + * + *
+   * The fully qualified uri of the database to be reconfigured.
+   * 
+ * + * optional string database_uri = 1; + * + * @return Whether the databaseUri field is set. + */ + @java.lang.Override + public boolean hasDatabaseUri() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The fully qualified uri of the database to be reconfigured.
+   * 
+ * + * optional string database_uri = 1; + * + * @return The databaseUri. + */ + @java.lang.Override + public java.lang.String getDatabaseUri() { + java.lang.Object ref = databaseUri_; + 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(); + databaseUri_ = s; + return s; + } + } + /** + * + * + *
+   * The fully qualified uri of the database to be reconfigured.
+   * 
+ * + * optional string database_uri = 1; + * + * @return The bytes for databaseUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseUriBytes() { + java.lang.Object ref = databaseUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVING_LOCATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList servingLocations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The locations of the serving regions, e.g. "asia-south1".
+   * 
+ * + * repeated string serving_locations = 2; + * + * @return A list containing the servingLocations. + */ + public com.google.protobuf.ProtocolStringList getServingLocationsList() { + return servingLocations_; + } + /** + * + * + *
+   * The locations of the serving regions, e.g. "asia-south1".
+   * 
+ * + * repeated string serving_locations = 2; + * + * @return The count of servingLocations. + */ + public int getServingLocationsCount() { + return servingLocations_.size(); + } + /** + * + * + *
+   * The locations of the serving regions, e.g. "asia-south1".
+   * 
+ * + * repeated string serving_locations = 2; + * + * @param index The index of the element to return. + * @return The servingLocations at the given index. + */ + public java.lang.String getServingLocations(int index) { + return servingLocations_.get(index); + } + /** + * + * + *
+   * The locations of the serving regions, e.g. "asia-south1".
+   * 
+ * + * repeated string serving_locations = 2; + * + * @param index The index of the value to return. + * @return The bytes of the servingLocations at the given index. + */ + public com.google.protobuf.ByteString getServingLocationsBytes(int index) { + return servingLocations_.getByteString(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 (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, databaseUri_); + } + for (int i = 0; i < servingLocations_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, servingLocations_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, databaseUri_); + } + { + int dataSize = 0; + for (int i = 0; i < servingLocations_.size(); i++) { + dataSize += computeStringSizeNoTag(servingLocations_.getRaw(i)); + } + size += dataSize; + size += 1 * getServingLocationsList().size(); + } + 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.executor.v1.ReconfigureCloudDatabaseAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction other = + (com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) obj; + + if (hasDatabaseUri() != other.hasDatabaseUri()) return false; + if (hasDatabaseUri()) { + if (!getDatabaseUri().equals(other.getDatabaseUri())) return false; + } + if (!getServingLocationsList().equals(other.getServingLocationsList())) 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 (hasDatabaseUri()) { + hash = (37 * hash) + DATABASE_URI_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseUri().hashCode(); + } + if (getServingLocationsCount() > 0) { + hash = (37 * hash) + SERVING_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getServingLocationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction 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.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction 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.executor.v1.ReconfigureCloudDatabaseAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction 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.executor.v1.ReconfigureCloudDatabaseAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction 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.executor.v1.ReconfigureCloudDatabaseAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction 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.executor.v1.ReconfigureCloudDatabaseAction 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; + } + /** + * + * + *
+   * Action that reconfigures a Cloud Spanner database.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ReconfigureCloudDatabaseAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ReconfigureCloudDatabaseAction) + com.google.spanner.executor.v1.ReconfigureCloudDatabaseActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.class, + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + databaseUri_ = ""; + servingLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ReconfigureCloudDatabaseAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction + getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction build() { + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction buildPartial() { + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction result = + new com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.databaseUri_ = databaseUri_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + servingLocations_.makeImmutable(); + result.servingLocations_ = servingLocations_; + } + result.bitField0_ |= to_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.executor.v1.ReconfigureCloudDatabaseAction) { + return mergeFrom((com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction other) { + if (other + == com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction.getDefaultInstance()) + return this; + if (other.hasDatabaseUri()) { + databaseUri_ = other.databaseUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.servingLocations_.isEmpty()) { + if (servingLocations_.isEmpty()) { + servingLocations_ = other.servingLocations_; + bitField0_ |= 0x00000002; + } else { + ensureServingLocationsIsMutable(); + servingLocations_.addAll(other.servingLocations_); + } + onChanged(); + } + 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: + { + databaseUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureServingLocationsIsMutable(); + servingLocations_.add(s); + break; + } // case 18 + 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 databaseUri_ = ""; + /** + * + * + *
+     * The fully qualified uri of the database to be reconfigured.
+     * 
+ * + * optional string database_uri = 1; + * + * @return Whether the databaseUri field is set. + */ + public boolean hasDatabaseUri() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The fully qualified uri of the database to be reconfigured.
+     * 
+ * + * optional string database_uri = 1; + * + * @return The databaseUri. + */ + public java.lang.String getDatabaseUri() { + java.lang.Object ref = databaseUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The fully qualified uri of the database to be reconfigured.
+     * 
+ * + * optional string database_uri = 1; + * + * @return The bytes for databaseUri. + */ + public com.google.protobuf.ByteString getDatabaseUriBytes() { + java.lang.Object ref = databaseUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The fully qualified uri of the database to be reconfigured.
+     * 
+ * + * optional string database_uri = 1; + * + * @param value The databaseUri to set. + * @return This builder for chaining. + */ + public Builder setDatabaseUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The fully qualified uri of the database to be reconfigured.
+     * 
+ * + * optional string database_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseUri() { + databaseUri_ = getDefaultInstance().getDatabaseUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The fully qualified uri of the database to be reconfigured.
+     * 
+ * + * optional string database_uri = 1; + * + * @param value The bytes for databaseUri to set. + * @return This builder for chaining. + */ + public Builder setDatabaseUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList servingLocations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureServingLocationsIsMutable() { + if (!servingLocations_.isModifiable()) { + servingLocations_ = new com.google.protobuf.LazyStringArrayList(servingLocations_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * The locations of the serving regions, e.g. "asia-south1".
+     * 
+ * + * repeated string serving_locations = 2; + * + * @return A list containing the servingLocations. + */ + public com.google.protobuf.ProtocolStringList getServingLocationsList() { + servingLocations_.makeImmutable(); + return servingLocations_; + } + /** + * + * + *
+     * The locations of the serving regions, e.g. "asia-south1".
+     * 
+ * + * repeated string serving_locations = 2; + * + * @return The count of servingLocations. + */ + public int getServingLocationsCount() { + return servingLocations_.size(); + } + /** + * + * + *
+     * The locations of the serving regions, e.g. "asia-south1".
+     * 
+ * + * repeated string serving_locations = 2; + * + * @param index The index of the element to return. + * @return The servingLocations at the given index. + */ + public java.lang.String getServingLocations(int index) { + return servingLocations_.get(index); + } + /** + * + * + *
+     * The locations of the serving regions, e.g. "asia-south1".
+     * 
+ * + * repeated string serving_locations = 2; + * + * @param index The index of the value to return. + * @return The bytes of the servingLocations at the given index. + */ + public com.google.protobuf.ByteString getServingLocationsBytes(int index) { + return servingLocations_.getByteString(index); + } + /** + * + * + *
+     * The locations of the serving regions, e.g. "asia-south1".
+     * 
+ * + * repeated string serving_locations = 2; + * + * @param index The index to set the value at. + * @param value The servingLocations to set. + * @return This builder for chaining. + */ + public Builder setServingLocations(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingLocationsIsMutable(); + servingLocations_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The locations of the serving regions, e.g. "asia-south1".
+     * 
+ * + * repeated string serving_locations = 2; + * + * @param value The servingLocations to add. + * @return This builder for chaining. + */ + public Builder addServingLocations(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingLocationsIsMutable(); + servingLocations_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The locations of the serving regions, e.g. "asia-south1".
+     * 
+ * + * repeated string serving_locations = 2; + * + * @param values The servingLocations to add. + * @return This builder for chaining. + */ + public Builder addAllServingLocations(java.lang.Iterable values) { + ensureServingLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, servingLocations_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The locations of the serving regions, e.g. "asia-south1".
+     * 
+ * + * repeated string serving_locations = 2; + * + * @return This builder for chaining. + */ + public Builder clearServingLocations() { + servingLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The locations of the serving regions, e.g. "asia-south1".
+     * 
+ * + * repeated string serving_locations = 2; + * + * @param value The bytes of the servingLocations to add. + * @return This builder for chaining. + */ + public Builder addServingLocationsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureServingLocationsIsMutable(); + servingLocations_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.ReconfigureCloudDatabaseAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ReconfigureCloudDatabaseAction) + private static final com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction(); + } + + public static com.google.spanner.executor.v1.ReconfigureCloudDatabaseAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReconfigureCloudDatabaseAction 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.executor.v1.ReconfigureCloudDatabaseAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReconfigureCloudDatabaseActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReconfigureCloudDatabaseActionOrBuilder.java new file mode 100644 index 00000000000..3faad5b6f92 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ReconfigureCloudDatabaseActionOrBuilder.java @@ -0,0 +1,113 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ReconfigureCloudDatabaseActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ReconfigureCloudDatabaseAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The fully qualified uri of the database to be reconfigured.
+   * 
+ * + * optional string database_uri = 1; + * + * @return Whether the databaseUri field is set. + */ + boolean hasDatabaseUri(); + /** + * + * + *
+   * The fully qualified uri of the database to be reconfigured.
+   * 
+ * + * optional string database_uri = 1; + * + * @return The databaseUri. + */ + java.lang.String getDatabaseUri(); + /** + * + * + *
+   * The fully qualified uri of the database to be reconfigured.
+   * 
+ * + * optional string database_uri = 1; + * + * @return The bytes for databaseUri. + */ + com.google.protobuf.ByteString getDatabaseUriBytes(); + + /** + * + * + *
+   * The locations of the serving regions, e.g. "asia-south1".
+   * 
+ * + * repeated string serving_locations = 2; + * + * @return A list containing the servingLocations. + */ + java.util.List getServingLocationsList(); + /** + * + * + *
+   * The locations of the serving regions, e.g. "asia-south1".
+   * 
+ * + * repeated string serving_locations = 2; + * + * @return The count of servingLocations. + */ + int getServingLocationsCount(); + /** + * + * + *
+   * The locations of the serving regions, e.g. "asia-south1".
+   * 
+ * + * repeated string serving_locations = 2; + * + * @param index The index of the element to return. + * @return The servingLocations at the given index. + */ + java.lang.String getServingLocations(int index); + /** + * + * + *
+   * The locations of the serving regions, e.g. "asia-south1".
+   * 
+ * + * repeated string serving_locations = 2; + * + * @param index The index of the value to return. + * @return The bytes of the servingLocations at the given index. + */ + com.google.protobuf.ByteString getServingLocationsBytes(int index); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseAction.java new file mode 100644 index 00000000000..29b08596e0d --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseAction.java @@ -0,0 +1,1367 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that restores a Cloud Spanner database from a backup.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.RestoreCloudDatabaseAction} + */ +public final class RestoreCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.RestoreCloudDatabaseAction) + RestoreCloudDatabaseActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use RestoreCloudDatabaseAction.newBuilder() to construct. + private RestoreCloudDatabaseAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RestoreCloudDatabaseAction() { + projectId_ = ""; + backupInstanceId_ = ""; + backupId_ = ""; + databaseInstanceId_ = ""; + databaseId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RestoreCloudDatabaseAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.RestoreCloudDatabaseAction.class, + com.google.spanner.executor.v1.RestoreCloudDatabaseAction.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupInstanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path) containing the backup, e.g. "backup-instance".
+   * 
+ * + * string backup_instance_id = 2; + * + * @return The backupInstanceId. + */ + @java.lang.Override + public java.lang.String getBackupInstanceId() { + java.lang.Object ref = backupInstanceId_; + 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(); + backupInstanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path) containing the backup, e.g. "backup-instance".
+   * 
+ * + * string backup_instance_id = 2; + * + * @return The bytes for backupInstanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupInstanceIdBytes() { + java.lang.Object ref = backupInstanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupInstanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupId_ = ""; + /** + * + * + *
+   * The id of the backup from which to restore, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + @java.lang.Override + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + 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(); + backupId_ = s; + return s; + } + } + /** + * + * + *
+   * The id of the backup from which to restore, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_INSTANCE_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseInstanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path) containing the database, e.g.
+   * "database-instance".
+   * 
+ * + * string database_instance_id = 4; + * + * @return The databaseInstanceId. + */ + @java.lang.Override + public java.lang.String getDatabaseInstanceId() { + java.lang.Object ref = databaseInstanceId_; + 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(); + databaseInstanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path) containing the database, e.g.
+   * "database-instance".
+   * 
+ * + * string database_instance_id = 4; + * + * @return The bytes for databaseInstanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseInstanceIdBytes() { + java.lang.Object ref = databaseInstanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseInstanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_ID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseId_ = ""; + /** + * + * + *
+   * The id of the database to create and restore to, e.g. "db0". Note that this
+   * database must not already exist.
+   * 
+ * + * string database_id = 5; + * + * @return The databaseId. + */ + @java.lang.Override + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + 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(); + databaseId_ = s; + return s; + } + } + /** + * + * + *
+   * The id of the database to create and restore to, e.g. "db0". Note that this
+   * database must not already exist.
+   * 
+ * + * string database_id = 5; + * + * @return The bytes for databaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupInstanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupInstanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseInstanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, databaseInstanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, databaseId_); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupInstanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupInstanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseInstanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, databaseInstanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, databaseId_); + } + 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.executor.v1.RestoreCloudDatabaseAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.RestoreCloudDatabaseAction other = + (com.google.spanner.executor.v1.RestoreCloudDatabaseAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getBackupInstanceId().equals(other.getBackupInstanceId())) return false; + if (!getBackupId().equals(other.getBackupId())) return false; + if (!getDatabaseInstanceId().equals(other.getDatabaseInstanceId())) return false; + if (!getDatabaseId().equals(other.getDatabaseId())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + BACKUP_INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupInstanceId().hashCode(); + hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupId().hashCode(); + hash = (37 * hash) + DATABASE_INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseInstanceId().hashCode(); + hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.RestoreCloudDatabaseAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.RestoreCloudDatabaseAction 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.executor.v1.RestoreCloudDatabaseAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.RestoreCloudDatabaseAction 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.executor.v1.RestoreCloudDatabaseAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.RestoreCloudDatabaseAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.RestoreCloudDatabaseAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.RestoreCloudDatabaseAction 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.executor.v1.RestoreCloudDatabaseAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.RestoreCloudDatabaseAction 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.executor.v1.RestoreCloudDatabaseAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.RestoreCloudDatabaseAction 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.executor.v1.RestoreCloudDatabaseAction 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; + } + /** + * + * + *
+   * Action that restores a Cloud Spanner database from a backup.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.RestoreCloudDatabaseAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.RestoreCloudDatabaseAction) + com.google.spanner.executor.v1.RestoreCloudDatabaseActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.RestoreCloudDatabaseAction.class, + com.google.spanner.executor.v1.RestoreCloudDatabaseAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.RestoreCloudDatabaseAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + backupInstanceId_ = ""; + backupId_ = ""; + databaseInstanceId_ = ""; + databaseId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_RestoreCloudDatabaseAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.RestoreCloudDatabaseAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.RestoreCloudDatabaseAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.RestoreCloudDatabaseAction build() { + com.google.spanner.executor.v1.RestoreCloudDatabaseAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.RestoreCloudDatabaseAction buildPartial() { + com.google.spanner.executor.v1.RestoreCloudDatabaseAction result = + new com.google.spanner.executor.v1.RestoreCloudDatabaseAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.RestoreCloudDatabaseAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupInstanceId_ = backupInstanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupId_ = backupId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.databaseInstanceId_ = databaseInstanceId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.databaseId_ = databaseId_; + } + } + + @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.executor.v1.RestoreCloudDatabaseAction) { + return mergeFrom((com.google.spanner.executor.v1.RestoreCloudDatabaseAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.RestoreCloudDatabaseAction other) { + if (other == com.google.spanner.executor.v1.RestoreCloudDatabaseAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupInstanceId().isEmpty()) { + backupInstanceId_ = other.backupInstanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getBackupId().isEmpty()) { + backupId_ = other.backupId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDatabaseInstanceId().isEmpty()) { + databaseInstanceId_ = other.databaseInstanceId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDatabaseId().isEmpty()) { + databaseId_ = other.databaseId_; + bitField0_ |= 0x00000010; + onChanged(); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + backupInstanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + backupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + databaseInstanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + databaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + 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 projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object backupInstanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path) containing the backup, e.g. "backup-instance".
+     * 
+ * + * string backup_instance_id = 2; + * + * @return The backupInstanceId. + */ + public java.lang.String getBackupInstanceId() { + java.lang.Object ref = backupInstanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupInstanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) containing the backup, e.g. "backup-instance".
+     * 
+ * + * string backup_instance_id = 2; + * + * @return The bytes for backupInstanceId. + */ + public com.google.protobuf.ByteString getBackupInstanceIdBytes() { + java.lang.Object ref = backupInstanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupInstanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) containing the backup, e.g. "backup-instance".
+     * 
+ * + * string backup_instance_id = 2; + * + * @param value The backupInstanceId to set. + * @return This builder for chaining. + */ + public Builder setBackupInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupInstanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) containing the backup, e.g. "backup-instance".
+     * 
+ * + * string backup_instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearBackupInstanceId() { + backupInstanceId_ = getDefaultInstance().getBackupInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) containing the backup, e.g. "backup-instance".
+     * 
+ * + * string backup_instance_id = 2; + * + * @param value The bytes for backupInstanceId to set. + * @return This builder for chaining. + */ + public Builder setBackupInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupInstanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object backupId_ = ""; + /** + * + * + *
+     * The id of the backup from which to restore, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The id of the backup from which to restore, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The id of the backup from which to restore, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @param value The backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the backup from which to restore, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearBackupId() { + backupId_ = getDefaultInstance().getBackupId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the backup from which to restore, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @param value The bytes for backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object databaseInstanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path) containing the database, e.g.
+     * "database-instance".
+     * 
+ * + * string database_instance_id = 4; + * + * @return The databaseInstanceId. + */ + public java.lang.String getDatabaseInstanceId() { + java.lang.Object ref = databaseInstanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseInstanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) containing the database, e.g.
+     * "database-instance".
+     * 
+ * + * string database_instance_id = 4; + * + * @return The bytes for databaseInstanceId. + */ + public com.google.protobuf.ByteString getDatabaseInstanceIdBytes() { + java.lang.Object ref = databaseInstanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseInstanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path) containing the database, e.g.
+     * "database-instance".
+     * 
+ * + * string database_instance_id = 4; + * + * @param value The databaseInstanceId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseInstanceId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) containing the database, e.g.
+     * "database-instance".
+     * 
+ * + * string database_instance_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseInstanceId() { + databaseInstanceId_ = getDefaultInstance().getDatabaseInstanceId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path) containing the database, e.g.
+     * "database-instance".
+     * 
+ * + * string database_instance_id = 4; + * + * @param value The bytes for databaseInstanceId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseInstanceId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object databaseId_ = ""; + /** + * + * + *
+     * The id of the database to create and restore to, e.g. "db0". Note that this
+     * database must not already exist.
+     * 
+ * + * string database_id = 5; + * + * @return The databaseId. + */ + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The id of the database to create and restore to, e.g. "db0". Note that this
+     * database must not already exist.
+     * 
+ * + * string database_id = 5; + * + * @return The bytes for databaseId. + */ + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The id of the database to create and restore to, e.g. "db0". Note that this
+     * database must not already exist.
+     * 
+ * + * string database_id = 5; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the database to create and restore to, e.g. "db0". Note that this
+     * database must not already exist.
+     * 
+ * + * string database_id = 5; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + databaseId_ = getDefaultInstance().getDatabaseId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the database to create and restore to, e.g. "db0". Note that this
+     * database must not already exist.
+     * 
+ * + * string database_id = 5; + * + * @param value The bytes for databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.RestoreCloudDatabaseAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.RestoreCloudDatabaseAction) + private static final com.google.spanner.executor.v1.RestoreCloudDatabaseAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.RestoreCloudDatabaseAction(); + } + + public static com.google.spanner.executor.v1.RestoreCloudDatabaseAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestoreCloudDatabaseAction 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.executor.v1.RestoreCloudDatabaseAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseActionOrBuilder.java new file mode 100644 index 00000000000..0630ed25a4f --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/RestoreCloudDatabaseActionOrBuilder.java @@ -0,0 +1,154 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface RestoreCloudDatabaseActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.RestoreCloudDatabaseAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path) containing the backup, e.g. "backup-instance".
+   * 
+ * + * string backup_instance_id = 2; + * + * @return The backupInstanceId. + */ + java.lang.String getBackupInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path) containing the backup, e.g. "backup-instance".
+   * 
+ * + * string backup_instance_id = 2; + * + * @return The bytes for backupInstanceId. + */ + com.google.protobuf.ByteString getBackupInstanceIdBytes(); + + /** + * + * + *
+   * The id of the backup from which to restore, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + java.lang.String getBackupId(); + /** + * + * + *
+   * The id of the backup from which to restore, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + com.google.protobuf.ByteString getBackupIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path) containing the database, e.g.
+   * "database-instance".
+   * 
+ * + * string database_instance_id = 4; + * + * @return The databaseInstanceId. + */ + java.lang.String getDatabaseInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path) containing the database, e.g.
+   * "database-instance".
+   * 
+ * + * string database_instance_id = 4; + * + * @return The bytes for databaseInstanceId. + */ + com.google.protobuf.ByteString getDatabaseInstanceIdBytes(); + + /** + * + * + *
+   * The id of the database to create and restore to, e.g. "db0". Note that this
+   * database must not already exist.
+   * 
+ * + * string database_id = 5; + * + * @return The databaseId. + */ + java.lang.String getDatabaseId(); + /** + * + * + *
+   * The id of the database to create and restore to, e.g. "db0". Note that this
+   * database must not already exist.
+   * 
+ * + * string database_id = 5; + * + * @return The bytes for databaseId. + */ + com.google.protobuf.ByteString getDatabaseIdBytes(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAction.java new file mode 100644 index 00000000000..93900be1ff0 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAction.java @@ -0,0 +1,5581 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * SpannerAction defines a primitive action that can be performed against
+ * Spanner, such as begin or commit a transaction, or perform a read or
+ * mutation.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.SpannerAction} + */ +public final class SpannerAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.SpannerAction) + SpannerActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpannerAction.newBuilder() to construct. + private SpannerAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpannerAction() { + databasePath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpannerAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.SpannerAction.class, + com.google.spanner.executor.v1.SpannerAction.Builder.class); + } + + private int actionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object action_; + + public enum ActionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + START(10), + FINISH(11), + READ(20), + QUERY(21), + MUTATION(22), + DML(23), + BATCH_DML(24), + WRITE(25), + PARTITIONED_UPDATE(27), + ADMIN(30), + START_BATCH_TXN(40), + CLOSE_BATCH_TXN(41), + GENERATE_DB_PARTITIONS_READ(42), + GENERATE_DB_PARTITIONS_QUERY(43), + EXECUTE_PARTITION(44), + EXECUTE_CHANGE_STREAM_QUERY(50), + ACTION_NOT_SET(0); + private final int value; + + private ActionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActionCase valueOf(int value) { + return forNumber(value); + } + + public static ActionCase forNumber(int value) { + switch (value) { + case 10: + return START; + case 11: + return FINISH; + case 20: + return READ; + case 21: + return QUERY; + case 22: + return MUTATION; + case 23: + return DML; + case 24: + return BATCH_DML; + case 25: + return WRITE; + case 27: + return PARTITIONED_UPDATE; + case 30: + return ADMIN; + case 40: + return START_BATCH_TXN; + case 41: + return CLOSE_BATCH_TXN; + case 42: + return GENERATE_DB_PARTITIONS_READ; + case 43: + return GENERATE_DB_PARTITIONS_QUERY; + case 44: + return EXECUTE_PARTITION; + case 50: + return EXECUTE_CHANGE_STREAM_QUERY; + case 0: + return ACTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public static final int DATABASE_PATH_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object databasePath_ = ""; + /** + * + * + *
+   * Database against which to perform action.
+   * In a context where a series of actions take place, an action may omit
+   * database path if it applies to the same database as the previous action.
+   * 
+ * + * string database_path = 1; + * + * @return The databasePath. + */ + @java.lang.Override + public java.lang.String getDatabasePath() { + java.lang.Object ref = databasePath_; + 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(); + databasePath_ = s; + return s; + } + } + /** + * + * + *
+   * Database against which to perform action.
+   * In a context where a series of actions take place, an action may omit
+   * database path if it applies to the same database as the previous action.
+   * 
+ * + * string database_path = 1; + * + * @return The bytes for databasePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabasePathBytes() { + java.lang.Object ref = databasePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databasePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_FIELD_NUMBER = 10; + /** + * + * + *
+   * Action to start a transaction.
+   * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + * + * @return Whether the start field is set. + */ + @java.lang.Override + public boolean hasStart() { + return actionCase_ == 10; + } + /** + * + * + *
+   * Action to start a transaction.
+   * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + * + * @return The start. + */ + @java.lang.Override + public com.google.spanner.executor.v1.StartTransactionAction getStart() { + if (actionCase_ == 10) { + return (com.google.spanner.executor.v1.StartTransactionAction) action_; + } + return com.google.spanner.executor.v1.StartTransactionAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to start a transaction.
+   * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + */ + @java.lang.Override + public com.google.spanner.executor.v1.StartTransactionActionOrBuilder getStartOrBuilder() { + if (actionCase_ == 10) { + return (com.google.spanner.executor.v1.StartTransactionAction) action_; + } + return com.google.spanner.executor.v1.StartTransactionAction.getDefaultInstance(); + } + + public static final int FINISH_FIELD_NUMBER = 11; + /** + * + * + *
+   * Action to finish a transaction.
+   * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + * + * @return Whether the finish field is set. + */ + @java.lang.Override + public boolean hasFinish() { + return actionCase_ == 11; + } + /** + * + * + *
+   * Action to finish a transaction.
+   * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + * + * @return The finish. + */ + @java.lang.Override + public com.google.spanner.executor.v1.FinishTransactionAction getFinish() { + if (actionCase_ == 11) { + return (com.google.spanner.executor.v1.FinishTransactionAction) action_; + } + return com.google.spanner.executor.v1.FinishTransactionAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to finish a transaction.
+   * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + */ + @java.lang.Override + public com.google.spanner.executor.v1.FinishTransactionActionOrBuilder getFinishOrBuilder() { + if (actionCase_ == 11) { + return (com.google.spanner.executor.v1.FinishTransactionAction) action_; + } + return com.google.spanner.executor.v1.FinishTransactionAction.getDefaultInstance(); + } + + public static final int READ_FIELD_NUMBER = 20; + /** + * + * + *
+   * Action to do a normal read.
+   * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + * + * @return Whether the read field is set. + */ + @java.lang.Override + public boolean hasRead() { + return actionCase_ == 20; + } + /** + * + * + *
+   * Action to do a normal read.
+   * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + * + * @return The read. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ReadAction getRead() { + if (actionCase_ == 20) { + return (com.google.spanner.executor.v1.ReadAction) action_; + } + return com.google.spanner.executor.v1.ReadAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to do a normal read.
+   * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ReadActionOrBuilder getReadOrBuilder() { + if (actionCase_ == 20) { + return (com.google.spanner.executor.v1.ReadAction) action_; + } + return com.google.spanner.executor.v1.ReadAction.getDefaultInstance(); + } + + public static final int QUERY_FIELD_NUMBER = 21; + /** + * + * + *
+   * Action to do a query.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return actionCase_ == 21; + } + /** + * + * + *
+   * Action to do a query.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + * + * @return The query. + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction getQuery() { + if (actionCase_ == 21) { + return (com.google.spanner.executor.v1.QueryAction) action_; + } + return com.google.spanner.executor.v1.QueryAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to do a query.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryActionOrBuilder getQueryOrBuilder() { + if (actionCase_ == 21) { + return (com.google.spanner.executor.v1.QueryAction) action_; + } + return com.google.spanner.executor.v1.QueryAction.getDefaultInstance(); + } + + public static final int MUTATION_FIELD_NUMBER = 22; + /** + * + * + *
+   * Action to buffer a mutation.
+   * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + * + * @return Whether the mutation field is set. + */ + @java.lang.Override + public boolean hasMutation() { + return actionCase_ == 22; + } + /** + * + * + *
+   * Action to buffer a mutation.
+   * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + * + * @return The mutation. + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction getMutation() { + if (actionCase_ == 22) { + return (com.google.spanner.executor.v1.MutationAction) action_; + } + return com.google.spanner.executor.v1.MutationAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to buffer a mutation.
+   * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationActionOrBuilder getMutationOrBuilder() { + if (actionCase_ == 22) { + return (com.google.spanner.executor.v1.MutationAction) action_; + } + return com.google.spanner.executor.v1.MutationAction.getDefaultInstance(); + } + + public static final int DML_FIELD_NUMBER = 23; + /** + * + * + *
+   * Action to a DML.
+   * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + * + * @return Whether the dml field is set. + */ + @java.lang.Override + public boolean hasDml() { + return actionCase_ == 23; + } + /** + * + * + *
+   * Action to a DML.
+   * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + * + * @return The dml. + */ + @java.lang.Override + public com.google.spanner.executor.v1.DmlAction getDml() { + if (actionCase_ == 23) { + return (com.google.spanner.executor.v1.DmlAction) action_; + } + return com.google.spanner.executor.v1.DmlAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to a DML.
+   * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DmlActionOrBuilder getDmlOrBuilder() { + if (actionCase_ == 23) { + return (com.google.spanner.executor.v1.DmlAction) action_; + } + return com.google.spanner.executor.v1.DmlAction.getDefaultInstance(); + } + + public static final int BATCH_DML_FIELD_NUMBER = 24; + /** + * + * + *
+   * Action to a batch DML.
+   * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + * + * @return Whether the batchDml field is set. + */ + @java.lang.Override + public boolean hasBatchDml() { + return actionCase_ == 24; + } + /** + * + * + *
+   * Action to a batch DML.
+   * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + * + * @return The batchDml. + */ + @java.lang.Override + public com.google.spanner.executor.v1.BatchDmlAction getBatchDml() { + if (actionCase_ == 24) { + return (com.google.spanner.executor.v1.BatchDmlAction) action_; + } + return com.google.spanner.executor.v1.BatchDmlAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to a batch DML.
+   * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + */ + @java.lang.Override + public com.google.spanner.executor.v1.BatchDmlActionOrBuilder getBatchDmlOrBuilder() { + if (actionCase_ == 24) { + return (com.google.spanner.executor.v1.BatchDmlAction) action_; + } + return com.google.spanner.executor.v1.BatchDmlAction.getDefaultInstance(); + } + + public static final int WRITE_FIELD_NUMBER = 25; + /** + * + * + *
+   * Action to write a mutation.
+   * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + * + * @return Whether the write field is set. + */ + @java.lang.Override + public boolean hasWrite() { + return actionCase_ == 25; + } + /** + * + * + *
+   * Action to write a mutation.
+   * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + * + * @return The write. + */ + @java.lang.Override + public com.google.spanner.executor.v1.WriteMutationsAction getWrite() { + if (actionCase_ == 25) { + return (com.google.spanner.executor.v1.WriteMutationsAction) action_; + } + return com.google.spanner.executor.v1.WriteMutationsAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to write a mutation.
+   * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + */ + @java.lang.Override + public com.google.spanner.executor.v1.WriteMutationsActionOrBuilder getWriteOrBuilder() { + if (actionCase_ == 25) { + return (com.google.spanner.executor.v1.WriteMutationsAction) action_; + } + return com.google.spanner.executor.v1.WriteMutationsAction.getDefaultInstance(); + } + + public static final int PARTITIONED_UPDATE_FIELD_NUMBER = 27; + /** + * + * + *
+   * Action to a partitioned update.
+   * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + * + * @return Whether the partitionedUpdate field is set. + */ + @java.lang.Override + public boolean hasPartitionedUpdate() { + return actionCase_ == 27; + } + /** + * + * + *
+   * Action to a partitioned update.
+   * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + * + * @return The partitionedUpdate. + */ + @java.lang.Override + public com.google.spanner.executor.v1.PartitionedUpdateAction getPartitionedUpdate() { + if (actionCase_ == 27) { + return (com.google.spanner.executor.v1.PartitionedUpdateAction) action_; + } + return com.google.spanner.executor.v1.PartitionedUpdateAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to a partitioned update.
+   * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + */ + @java.lang.Override + public com.google.spanner.executor.v1.PartitionedUpdateActionOrBuilder + getPartitionedUpdateOrBuilder() { + if (actionCase_ == 27) { + return (com.google.spanner.executor.v1.PartitionedUpdateAction) action_; + } + return com.google.spanner.executor.v1.PartitionedUpdateAction.getDefaultInstance(); + } + + public static final int ADMIN_FIELD_NUMBER = 30; + /** + * + * + *
+   * Action that contains any administrative operation, like database,
+   * instance manipulation.
+   * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + * + * @return Whether the admin field is set. + */ + @java.lang.Override + public boolean hasAdmin() { + return actionCase_ == 30; + } + /** + * + * + *
+   * Action that contains any administrative operation, like database,
+   * instance manipulation.
+   * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + * + * @return The admin. + */ + @java.lang.Override + public com.google.spanner.executor.v1.AdminAction getAdmin() { + if (actionCase_ == 30) { + return (com.google.spanner.executor.v1.AdminAction) action_; + } + return com.google.spanner.executor.v1.AdminAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action that contains any administrative operation, like database,
+   * instance manipulation.
+   * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + */ + @java.lang.Override + public com.google.spanner.executor.v1.AdminActionOrBuilder getAdminOrBuilder() { + if (actionCase_ == 30) { + return (com.google.spanner.executor.v1.AdminAction) action_; + } + return com.google.spanner.executor.v1.AdminAction.getDefaultInstance(); + } + + public static final int START_BATCH_TXN_FIELD_NUMBER = 40; + /** + * + * + *
+   * Action to start a batch transaction.
+   * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + * + * @return Whether the startBatchTxn field is set. + */ + @java.lang.Override + public boolean hasStartBatchTxn() { + return actionCase_ == 40; + } + /** + * + * + *
+   * Action to start a batch transaction.
+   * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + * + * @return The startBatchTxn. + */ + @java.lang.Override + public com.google.spanner.executor.v1.StartBatchTransactionAction getStartBatchTxn() { + if (actionCase_ == 40) { + return (com.google.spanner.executor.v1.StartBatchTransactionAction) action_; + } + return com.google.spanner.executor.v1.StartBatchTransactionAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to start a batch transaction.
+   * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + */ + @java.lang.Override + public com.google.spanner.executor.v1.StartBatchTransactionActionOrBuilder + getStartBatchTxnOrBuilder() { + if (actionCase_ == 40) { + return (com.google.spanner.executor.v1.StartBatchTransactionAction) action_; + } + return com.google.spanner.executor.v1.StartBatchTransactionAction.getDefaultInstance(); + } + + public static final int CLOSE_BATCH_TXN_FIELD_NUMBER = 41; + /** + * + * + *
+   * Action to close a batch transaction.
+   * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + * + * @return Whether the closeBatchTxn field is set. + */ + @java.lang.Override + public boolean hasCloseBatchTxn() { + return actionCase_ == 41; + } + /** + * + * + *
+   * Action to close a batch transaction.
+   * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + * + * @return The closeBatchTxn. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CloseBatchTransactionAction getCloseBatchTxn() { + if (actionCase_ == 41) { + return (com.google.spanner.executor.v1.CloseBatchTransactionAction) action_; + } + return com.google.spanner.executor.v1.CloseBatchTransactionAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to close a batch transaction.
+   * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CloseBatchTransactionActionOrBuilder + getCloseBatchTxnOrBuilder() { + if (actionCase_ == 41) { + return (com.google.spanner.executor.v1.CloseBatchTransactionAction) action_; + } + return com.google.spanner.executor.v1.CloseBatchTransactionAction.getDefaultInstance(); + } + + public static final int GENERATE_DB_PARTITIONS_READ_FIELD_NUMBER = 42; + /** + * + * + *
+   * Action to generate database partitions for batch read.
+   * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + * + * @return Whether the generateDbPartitionsRead field is set. + */ + @java.lang.Override + public boolean hasGenerateDbPartitionsRead() { + return actionCase_ == 42; + } + /** + * + * + *
+   * Action to generate database partitions for batch read.
+   * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + * + * @return The generateDbPartitionsRead. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction + getGenerateDbPartitionsRead() { + if (actionCase_ == 42) { + return (com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction) action_; + } + return com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to generate database partitions for batch read.
+   * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForReadActionOrBuilder + getGenerateDbPartitionsReadOrBuilder() { + if (actionCase_ == 42) { + return (com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction) action_; + } + return com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.getDefaultInstance(); + } + + public static final int GENERATE_DB_PARTITIONS_QUERY_FIELD_NUMBER = 43; + /** + * + * + *
+   * Action to generate database partitions for batch query.
+   * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + * + * @return Whether the generateDbPartitionsQuery field is set. + */ + @java.lang.Override + public boolean hasGenerateDbPartitionsQuery() { + return actionCase_ == 43; + } + /** + * + * + *
+   * Action to generate database partitions for batch query.
+   * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + * + * @return The generateDbPartitionsQuery. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction + getGenerateDbPartitionsQuery() { + if (actionCase_ == 43) { + return (com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) action_; + } + return com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to generate database partitions for batch query.
+   * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForQueryActionOrBuilder + getGenerateDbPartitionsQueryOrBuilder() { + if (actionCase_ == 43) { + return (com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) action_; + } + return com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.getDefaultInstance(); + } + + public static final int EXECUTE_PARTITION_FIELD_NUMBER = 44; + /** + * + * + *
+   * Action to execute batch actions on generated partitions.
+   * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + * + * @return Whether the executePartition field is set. + */ + @java.lang.Override + public boolean hasExecutePartition() { + return actionCase_ == 44; + } + /** + * + * + *
+   * Action to execute batch actions on generated partitions.
+   * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + * + * @return The executePartition. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ExecutePartitionAction getExecutePartition() { + if (actionCase_ == 44) { + return (com.google.spanner.executor.v1.ExecutePartitionAction) action_; + } + return com.google.spanner.executor.v1.ExecutePartitionAction.getDefaultInstance(); + } + /** + * + * + *
+   * Action to execute batch actions on generated partitions.
+   * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ExecutePartitionActionOrBuilder + getExecutePartitionOrBuilder() { + if (actionCase_ == 44) { + return (com.google.spanner.executor.v1.ExecutePartitionAction) action_; + } + return com.google.spanner.executor.v1.ExecutePartitionAction.getDefaultInstance(); + } + + public static final int EXECUTE_CHANGE_STREAM_QUERY_FIELD_NUMBER = 50; + /** + * + * + *
+   * Action to execute change stream query.
+   * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + * + * @return Whether the executeChangeStreamQuery field is set. + */ + @java.lang.Override + public boolean hasExecuteChangeStreamQuery() { + return actionCase_ == 50; + } + /** + * + * + *
+   * Action to execute change stream query.
+   * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + * + * @return The executeChangeStreamQuery. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ExecuteChangeStreamQuery getExecuteChangeStreamQuery() { + if (actionCase_ == 50) { + return (com.google.spanner.executor.v1.ExecuteChangeStreamQuery) action_; + } + return com.google.spanner.executor.v1.ExecuteChangeStreamQuery.getDefaultInstance(); + } + /** + * + * + *
+   * Action to execute change stream query.
+   * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ExecuteChangeStreamQueryOrBuilder + getExecuteChangeStreamQueryOrBuilder() { + if (actionCase_ == 50) { + return (com.google.spanner.executor.v1.ExecuteChangeStreamQuery) action_; + } + return com.google.spanner.executor.v1.ExecuteChangeStreamQuery.getDefaultInstance(); + } + + 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(databasePath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, databasePath_); + } + if (actionCase_ == 10) { + output.writeMessage(10, (com.google.spanner.executor.v1.StartTransactionAction) action_); + } + if (actionCase_ == 11) { + output.writeMessage(11, (com.google.spanner.executor.v1.FinishTransactionAction) action_); + } + if (actionCase_ == 20) { + output.writeMessage(20, (com.google.spanner.executor.v1.ReadAction) action_); + } + if (actionCase_ == 21) { + output.writeMessage(21, (com.google.spanner.executor.v1.QueryAction) action_); + } + if (actionCase_ == 22) { + output.writeMessage(22, (com.google.spanner.executor.v1.MutationAction) action_); + } + if (actionCase_ == 23) { + output.writeMessage(23, (com.google.spanner.executor.v1.DmlAction) action_); + } + if (actionCase_ == 24) { + output.writeMessage(24, (com.google.spanner.executor.v1.BatchDmlAction) action_); + } + if (actionCase_ == 25) { + output.writeMessage(25, (com.google.spanner.executor.v1.WriteMutationsAction) action_); + } + if (actionCase_ == 27) { + output.writeMessage(27, (com.google.spanner.executor.v1.PartitionedUpdateAction) action_); + } + if (actionCase_ == 30) { + output.writeMessage(30, (com.google.spanner.executor.v1.AdminAction) action_); + } + if (actionCase_ == 40) { + output.writeMessage(40, (com.google.spanner.executor.v1.StartBatchTransactionAction) action_); + } + if (actionCase_ == 41) { + output.writeMessage(41, (com.google.spanner.executor.v1.CloseBatchTransactionAction) action_); + } + if (actionCase_ == 42) { + output.writeMessage( + 42, (com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction) action_); + } + if (actionCase_ == 43) { + output.writeMessage( + 43, (com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) action_); + } + if (actionCase_ == 44) { + output.writeMessage(44, (com.google.spanner.executor.v1.ExecutePartitionAction) action_); + } + if (actionCase_ == 50) { + output.writeMessage(50, (com.google.spanner.executor.v1.ExecuteChangeStreamQuery) action_); + } + 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(databasePath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, databasePath_); + } + if (actionCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.spanner.executor.v1.StartTransactionAction) action_); + } + if (actionCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.spanner.executor.v1.FinishTransactionAction) action_); + } + if (actionCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (com.google.spanner.executor.v1.ReadAction) action_); + } + if (actionCase_ == 21) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 21, (com.google.spanner.executor.v1.QueryAction) action_); + } + if (actionCase_ == 22) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 22, (com.google.spanner.executor.v1.MutationAction) action_); + } + if (actionCase_ == 23) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 23, (com.google.spanner.executor.v1.DmlAction) action_); + } + if (actionCase_ == 24) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 24, (com.google.spanner.executor.v1.BatchDmlAction) action_); + } + if (actionCase_ == 25) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 25, (com.google.spanner.executor.v1.WriteMutationsAction) action_); + } + if (actionCase_ == 27) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 27, (com.google.spanner.executor.v1.PartitionedUpdateAction) action_); + } + if (actionCase_ == 30) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 30, (com.google.spanner.executor.v1.AdminAction) action_); + } + if (actionCase_ == 40) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 40, (com.google.spanner.executor.v1.StartBatchTransactionAction) action_); + } + if (actionCase_ == 41) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 41, (com.google.spanner.executor.v1.CloseBatchTransactionAction) action_); + } + if (actionCase_ == 42) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 42, (com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction) action_); + } + if (actionCase_ == 43) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 43, (com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) action_); + } + if (actionCase_ == 44) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 44, (com.google.spanner.executor.v1.ExecutePartitionAction) action_); + } + if (actionCase_ == 50) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 50, (com.google.spanner.executor.v1.ExecuteChangeStreamQuery) action_); + } + 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.executor.v1.SpannerAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.SpannerAction other = + (com.google.spanner.executor.v1.SpannerAction) obj; + + if (!getDatabasePath().equals(other.getDatabasePath())) return false; + if (!getActionCase().equals(other.getActionCase())) return false; + switch (actionCase_) { + case 10: + if (!getStart().equals(other.getStart())) return false; + break; + case 11: + if (!getFinish().equals(other.getFinish())) return false; + break; + case 20: + if (!getRead().equals(other.getRead())) return false; + break; + case 21: + if (!getQuery().equals(other.getQuery())) return false; + break; + case 22: + if (!getMutation().equals(other.getMutation())) return false; + break; + case 23: + if (!getDml().equals(other.getDml())) return false; + break; + case 24: + if (!getBatchDml().equals(other.getBatchDml())) return false; + break; + case 25: + if (!getWrite().equals(other.getWrite())) return false; + break; + case 27: + if (!getPartitionedUpdate().equals(other.getPartitionedUpdate())) return false; + break; + case 30: + if (!getAdmin().equals(other.getAdmin())) return false; + break; + case 40: + if (!getStartBatchTxn().equals(other.getStartBatchTxn())) return false; + break; + case 41: + if (!getCloseBatchTxn().equals(other.getCloseBatchTxn())) return false; + break; + case 42: + if (!getGenerateDbPartitionsRead().equals(other.getGenerateDbPartitionsRead())) + return false; + break; + case 43: + if (!getGenerateDbPartitionsQuery().equals(other.getGenerateDbPartitionsQuery())) + return false; + break; + case 44: + if (!getExecutePartition().equals(other.getExecutePartition())) return false; + break; + case 50: + if (!getExecuteChangeStreamQuery().equals(other.getExecuteChangeStreamQuery())) + return false; + break; + case 0: + default: + } + 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) + DATABASE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getDatabasePath().hashCode(); + switch (actionCase_) { + case 10: + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + getStart().hashCode(); + break; + case 11: + hash = (37 * hash) + FINISH_FIELD_NUMBER; + hash = (53 * hash) + getFinish().hashCode(); + break; + case 20: + hash = (37 * hash) + READ_FIELD_NUMBER; + hash = (53 * hash) + getRead().hashCode(); + break; + case 21: + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + break; + case 22: + hash = (37 * hash) + MUTATION_FIELD_NUMBER; + hash = (53 * hash) + getMutation().hashCode(); + break; + case 23: + hash = (37 * hash) + DML_FIELD_NUMBER; + hash = (53 * hash) + getDml().hashCode(); + break; + case 24: + hash = (37 * hash) + BATCH_DML_FIELD_NUMBER; + hash = (53 * hash) + getBatchDml().hashCode(); + break; + case 25: + hash = (37 * hash) + WRITE_FIELD_NUMBER; + hash = (53 * hash) + getWrite().hashCode(); + break; + case 27: + hash = (37 * hash) + PARTITIONED_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getPartitionedUpdate().hashCode(); + break; + case 30: + hash = (37 * hash) + ADMIN_FIELD_NUMBER; + hash = (53 * hash) + getAdmin().hashCode(); + break; + case 40: + hash = (37 * hash) + START_BATCH_TXN_FIELD_NUMBER; + hash = (53 * hash) + getStartBatchTxn().hashCode(); + break; + case 41: + hash = (37 * hash) + CLOSE_BATCH_TXN_FIELD_NUMBER; + hash = (53 * hash) + getCloseBatchTxn().hashCode(); + break; + case 42: + hash = (37 * hash) + GENERATE_DB_PARTITIONS_READ_FIELD_NUMBER; + hash = (53 * hash) + getGenerateDbPartitionsRead().hashCode(); + break; + case 43: + hash = (37 * hash) + GENERATE_DB_PARTITIONS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getGenerateDbPartitionsQuery().hashCode(); + break; + case 44: + hash = (37 * hash) + EXECUTE_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getExecutePartition().hashCode(); + break; + case 50: + hash = (37 * hash) + EXECUTE_CHANGE_STREAM_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getExecuteChangeStreamQuery().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.SpannerAction parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerAction 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.executor.v1.SpannerAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerAction 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.executor.v1.SpannerAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.SpannerAction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerAction 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.executor.v1.SpannerAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerAction 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.executor.v1.SpannerAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerAction 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.executor.v1.SpannerAction 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; + } + /** + * + * + *
+   * SpannerAction defines a primitive action that can be performed against
+   * Spanner, such as begin or commit a transaction, or perform a read or
+   * mutation.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.SpannerAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.SpannerAction) + com.google.spanner.executor.v1.SpannerActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.SpannerAction.class, + com.google.spanner.executor.v1.SpannerAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.SpannerAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + databasePath_ = ""; + if (startBuilder_ != null) { + startBuilder_.clear(); + } + if (finishBuilder_ != null) { + finishBuilder_.clear(); + } + if (readBuilder_ != null) { + readBuilder_.clear(); + } + if (queryBuilder_ != null) { + queryBuilder_.clear(); + } + if (mutationBuilder_ != null) { + mutationBuilder_.clear(); + } + if (dmlBuilder_ != null) { + dmlBuilder_.clear(); + } + if (batchDmlBuilder_ != null) { + batchDmlBuilder_.clear(); + } + if (writeBuilder_ != null) { + writeBuilder_.clear(); + } + if (partitionedUpdateBuilder_ != null) { + partitionedUpdateBuilder_.clear(); + } + if (adminBuilder_ != null) { + adminBuilder_.clear(); + } + if (startBatchTxnBuilder_ != null) { + startBatchTxnBuilder_.clear(); + } + if (closeBatchTxnBuilder_ != null) { + closeBatchTxnBuilder_.clear(); + } + if (generateDbPartitionsReadBuilder_ != null) { + generateDbPartitionsReadBuilder_.clear(); + } + if (generateDbPartitionsQueryBuilder_ != null) { + generateDbPartitionsQueryBuilder_.clear(); + } + if (executePartitionBuilder_ != null) { + executePartitionBuilder_.clear(); + } + if (executeChangeStreamQueryBuilder_ != null) { + executeChangeStreamQueryBuilder_.clear(); + } + actionCase_ = 0; + action_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.SpannerAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerAction build() { + com.google.spanner.executor.v1.SpannerAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerAction buildPartial() { + com.google.spanner.executor.v1.SpannerAction result = + new com.google.spanner.executor.v1.SpannerAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.SpannerAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.databasePath_ = databasePath_; + } + } + + private void buildPartialOneofs(com.google.spanner.executor.v1.SpannerAction result) { + result.actionCase_ = actionCase_; + result.action_ = this.action_; + if (actionCase_ == 10 && startBuilder_ != null) { + result.action_ = startBuilder_.build(); + } + if (actionCase_ == 11 && finishBuilder_ != null) { + result.action_ = finishBuilder_.build(); + } + if (actionCase_ == 20 && readBuilder_ != null) { + result.action_ = readBuilder_.build(); + } + if (actionCase_ == 21 && queryBuilder_ != null) { + result.action_ = queryBuilder_.build(); + } + if (actionCase_ == 22 && mutationBuilder_ != null) { + result.action_ = mutationBuilder_.build(); + } + if (actionCase_ == 23 && dmlBuilder_ != null) { + result.action_ = dmlBuilder_.build(); + } + if (actionCase_ == 24 && batchDmlBuilder_ != null) { + result.action_ = batchDmlBuilder_.build(); + } + if (actionCase_ == 25 && writeBuilder_ != null) { + result.action_ = writeBuilder_.build(); + } + if (actionCase_ == 27 && partitionedUpdateBuilder_ != null) { + result.action_ = partitionedUpdateBuilder_.build(); + } + if (actionCase_ == 30 && adminBuilder_ != null) { + result.action_ = adminBuilder_.build(); + } + if (actionCase_ == 40 && startBatchTxnBuilder_ != null) { + result.action_ = startBatchTxnBuilder_.build(); + } + if (actionCase_ == 41 && closeBatchTxnBuilder_ != null) { + result.action_ = closeBatchTxnBuilder_.build(); + } + if (actionCase_ == 42 && generateDbPartitionsReadBuilder_ != null) { + result.action_ = generateDbPartitionsReadBuilder_.build(); + } + if (actionCase_ == 43 && generateDbPartitionsQueryBuilder_ != null) { + result.action_ = generateDbPartitionsQueryBuilder_.build(); + } + if (actionCase_ == 44 && executePartitionBuilder_ != null) { + result.action_ = executePartitionBuilder_.build(); + } + if (actionCase_ == 50 && executeChangeStreamQueryBuilder_ != null) { + result.action_ = executeChangeStreamQueryBuilder_.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.executor.v1.SpannerAction) { + return mergeFrom((com.google.spanner.executor.v1.SpannerAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.SpannerAction other) { + if (other == com.google.spanner.executor.v1.SpannerAction.getDefaultInstance()) return this; + if (!other.getDatabasePath().isEmpty()) { + databasePath_ = other.databasePath_; + bitField0_ |= 0x00000001; + onChanged(); + } + switch (other.getActionCase()) { + case START: + { + mergeStart(other.getStart()); + break; + } + case FINISH: + { + mergeFinish(other.getFinish()); + break; + } + case READ: + { + mergeRead(other.getRead()); + break; + } + case QUERY: + { + mergeQuery(other.getQuery()); + break; + } + case MUTATION: + { + mergeMutation(other.getMutation()); + break; + } + case DML: + { + mergeDml(other.getDml()); + break; + } + case BATCH_DML: + { + mergeBatchDml(other.getBatchDml()); + break; + } + case WRITE: + { + mergeWrite(other.getWrite()); + break; + } + case PARTITIONED_UPDATE: + { + mergePartitionedUpdate(other.getPartitionedUpdate()); + break; + } + case ADMIN: + { + mergeAdmin(other.getAdmin()); + break; + } + case START_BATCH_TXN: + { + mergeStartBatchTxn(other.getStartBatchTxn()); + break; + } + case CLOSE_BATCH_TXN: + { + mergeCloseBatchTxn(other.getCloseBatchTxn()); + break; + } + case GENERATE_DB_PARTITIONS_READ: + { + mergeGenerateDbPartitionsRead(other.getGenerateDbPartitionsRead()); + break; + } + case GENERATE_DB_PARTITIONS_QUERY: + { + mergeGenerateDbPartitionsQuery(other.getGenerateDbPartitionsQuery()); + break; + } + case EXECUTE_PARTITION: + { + mergeExecutePartition(other.getExecutePartition()); + break; + } + case EXECUTE_CHANGE_STREAM_QUERY: + { + mergeExecuteChangeStreamQuery(other.getExecuteChangeStreamQuery()); + break; + } + case ACTION_NOT_SET: + { + break; + } + } + 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: + { + databasePath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 82: + { + input.readMessage(getStartFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage(getFinishFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 11; + break; + } // case 90 + case 162: + { + input.readMessage(getReadFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 20; + break; + } // case 162 + case 170: + { + input.readMessage(getQueryFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 21; + break; + } // case 170 + case 178: + { + input.readMessage(getMutationFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 22; + break; + } // case 178 + case 186: + { + input.readMessage(getDmlFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 23; + break; + } // case 186 + case 194: + { + input.readMessage(getBatchDmlFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 24; + break; + } // case 194 + case 202: + { + input.readMessage(getWriteFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 25; + break; + } // case 202 + case 218: + { + input.readMessage( + getPartitionedUpdateFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 27; + break; + } // case 218 + case 242: + { + input.readMessage(getAdminFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 30; + break; + } // case 242 + case 322: + { + input.readMessage(getStartBatchTxnFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 40; + break; + } // case 322 + case 330: + { + input.readMessage(getCloseBatchTxnFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 41; + break; + } // case 330 + case 338: + { + input.readMessage( + getGenerateDbPartitionsReadFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 42; + break; + } // case 338 + case 346: + { + input.readMessage( + getGenerateDbPartitionsQueryFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 43; + break; + } // case 346 + case 354: + { + input.readMessage( + getExecutePartitionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 44; + break; + } // case 354 + case 402: + { + input.readMessage( + getExecuteChangeStreamQueryFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 50; + break; + } // case 402 + 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 actionCase_ = 0; + private java.lang.Object action_; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public Builder clearAction() { + actionCase_ = 0; + action_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object databasePath_ = ""; + /** + * + * + *
+     * Database against which to perform action.
+     * In a context where a series of actions take place, an action may omit
+     * database path if it applies to the same database as the previous action.
+     * 
+ * + * string database_path = 1; + * + * @return The databasePath. + */ + public java.lang.String getDatabasePath() { + java.lang.Object ref = databasePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databasePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Database against which to perform action.
+     * In a context where a series of actions take place, an action may omit
+     * database path if it applies to the same database as the previous action.
+     * 
+ * + * string database_path = 1; + * + * @return The bytes for databasePath. + */ + public com.google.protobuf.ByteString getDatabasePathBytes() { + java.lang.Object ref = databasePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databasePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Database against which to perform action.
+     * In a context where a series of actions take place, an action may omit
+     * database path if it applies to the same database as the previous action.
+     * 
+ * + * string database_path = 1; + * + * @param value The databasePath to set. + * @return This builder for chaining. + */ + public Builder setDatabasePath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databasePath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Database against which to perform action.
+     * In a context where a series of actions take place, an action may omit
+     * database path if it applies to the same database as the previous action.
+     * 
+ * + * string database_path = 1; + * + * @return This builder for chaining. + */ + public Builder clearDatabasePath() { + databasePath_ = getDefaultInstance().getDatabasePath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Database against which to perform action.
+     * In a context where a series of actions take place, an action may omit
+     * database path if it applies to the same database as the previous action.
+     * 
+ * + * string database_path = 1; + * + * @param value The bytes for databasePath to set. + * @return This builder for chaining. + */ + public Builder setDatabasePathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databasePath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.StartTransactionAction, + com.google.spanner.executor.v1.StartTransactionAction.Builder, + com.google.spanner.executor.v1.StartTransactionActionOrBuilder> + startBuilder_; + /** + * + * + *
+     * Action to start a transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + * + * @return Whether the start field is set. + */ + @java.lang.Override + public boolean hasStart() { + return actionCase_ == 10; + } + /** + * + * + *
+     * Action to start a transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + * + * @return The start. + */ + @java.lang.Override + public com.google.spanner.executor.v1.StartTransactionAction getStart() { + if (startBuilder_ == null) { + if (actionCase_ == 10) { + return (com.google.spanner.executor.v1.StartTransactionAction) action_; + } + return com.google.spanner.executor.v1.StartTransactionAction.getDefaultInstance(); + } else { + if (actionCase_ == 10) { + return startBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.StartTransactionAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to start a transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + */ + public Builder setStart(com.google.spanner.executor.v1.StartTransactionAction value) { + if (startBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + startBuilder_.setMessage(value); + } + actionCase_ = 10; + return this; + } + /** + * + * + *
+     * Action to start a transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + */ + public Builder setStart( + com.google.spanner.executor.v1.StartTransactionAction.Builder builderForValue) { + if (startBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + startBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 10; + return this; + } + /** + * + * + *
+     * Action to start a transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + */ + public Builder mergeStart(com.google.spanner.executor.v1.StartTransactionAction value) { + if (startBuilder_ == null) { + if (actionCase_ == 10 + && action_ + != com.google.spanner.executor.v1.StartTransactionAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.StartTransactionAction.newBuilder( + (com.google.spanner.executor.v1.StartTransactionAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 10) { + startBuilder_.mergeFrom(value); + } else { + startBuilder_.setMessage(value); + } + } + actionCase_ = 10; + return this; + } + /** + * + * + *
+     * Action to start a transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + */ + public Builder clearStart() { + if (startBuilder_ == null) { + if (actionCase_ == 10) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 10) { + actionCase_ = 0; + action_ = null; + } + startBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to start a transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + */ + public com.google.spanner.executor.v1.StartTransactionAction.Builder getStartBuilder() { + return getStartFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to start a transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + */ + @java.lang.Override + public com.google.spanner.executor.v1.StartTransactionActionOrBuilder getStartOrBuilder() { + if ((actionCase_ == 10) && (startBuilder_ != null)) { + return startBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 10) { + return (com.google.spanner.executor.v1.StartTransactionAction) action_; + } + return com.google.spanner.executor.v1.StartTransactionAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to start a transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.StartTransactionAction, + com.google.spanner.executor.v1.StartTransactionAction.Builder, + com.google.spanner.executor.v1.StartTransactionActionOrBuilder> + getStartFieldBuilder() { + if (startBuilder_ == null) { + if (!(actionCase_ == 10)) { + action_ = com.google.spanner.executor.v1.StartTransactionAction.getDefaultInstance(); + } + startBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.StartTransactionAction, + com.google.spanner.executor.v1.StartTransactionAction.Builder, + com.google.spanner.executor.v1.StartTransactionActionOrBuilder>( + (com.google.spanner.executor.v1.StartTransactionAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 10; + onChanged(); + return startBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.FinishTransactionAction, + com.google.spanner.executor.v1.FinishTransactionAction.Builder, + com.google.spanner.executor.v1.FinishTransactionActionOrBuilder> + finishBuilder_; + /** + * + * + *
+     * Action to finish a transaction.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + * + * @return Whether the finish field is set. + */ + @java.lang.Override + public boolean hasFinish() { + return actionCase_ == 11; + } + /** + * + * + *
+     * Action to finish a transaction.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + * + * @return The finish. + */ + @java.lang.Override + public com.google.spanner.executor.v1.FinishTransactionAction getFinish() { + if (finishBuilder_ == null) { + if (actionCase_ == 11) { + return (com.google.spanner.executor.v1.FinishTransactionAction) action_; + } + return com.google.spanner.executor.v1.FinishTransactionAction.getDefaultInstance(); + } else { + if (actionCase_ == 11) { + return finishBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.FinishTransactionAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to finish a transaction.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + */ + public Builder setFinish(com.google.spanner.executor.v1.FinishTransactionAction value) { + if (finishBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + finishBuilder_.setMessage(value); + } + actionCase_ = 11; + return this; + } + /** + * + * + *
+     * Action to finish a transaction.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + */ + public Builder setFinish( + com.google.spanner.executor.v1.FinishTransactionAction.Builder builderForValue) { + if (finishBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + finishBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 11; + return this; + } + /** + * + * + *
+     * Action to finish a transaction.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + */ + public Builder mergeFinish(com.google.spanner.executor.v1.FinishTransactionAction value) { + if (finishBuilder_ == null) { + if (actionCase_ == 11 + && action_ + != com.google.spanner.executor.v1.FinishTransactionAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.FinishTransactionAction.newBuilder( + (com.google.spanner.executor.v1.FinishTransactionAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 11) { + finishBuilder_.mergeFrom(value); + } else { + finishBuilder_.setMessage(value); + } + } + actionCase_ = 11; + return this; + } + /** + * + * + *
+     * Action to finish a transaction.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + */ + public Builder clearFinish() { + if (finishBuilder_ == null) { + if (actionCase_ == 11) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 11) { + actionCase_ = 0; + action_ = null; + } + finishBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to finish a transaction.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + */ + public com.google.spanner.executor.v1.FinishTransactionAction.Builder getFinishBuilder() { + return getFinishFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to finish a transaction.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + */ + @java.lang.Override + public com.google.spanner.executor.v1.FinishTransactionActionOrBuilder getFinishOrBuilder() { + if ((actionCase_ == 11) && (finishBuilder_ != null)) { + return finishBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 11) { + return (com.google.spanner.executor.v1.FinishTransactionAction) action_; + } + return com.google.spanner.executor.v1.FinishTransactionAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to finish a transaction.
+     * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.FinishTransactionAction, + com.google.spanner.executor.v1.FinishTransactionAction.Builder, + com.google.spanner.executor.v1.FinishTransactionActionOrBuilder> + getFinishFieldBuilder() { + if (finishBuilder_ == null) { + if (!(actionCase_ == 11)) { + action_ = com.google.spanner.executor.v1.FinishTransactionAction.getDefaultInstance(); + } + finishBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.FinishTransactionAction, + com.google.spanner.executor.v1.FinishTransactionAction.Builder, + com.google.spanner.executor.v1.FinishTransactionActionOrBuilder>( + (com.google.spanner.executor.v1.FinishTransactionAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 11; + onChanged(); + return finishBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ReadAction, + com.google.spanner.executor.v1.ReadAction.Builder, + com.google.spanner.executor.v1.ReadActionOrBuilder> + readBuilder_; + /** + * + * + *
+     * Action to do a normal read.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + * + * @return Whether the read field is set. + */ + @java.lang.Override + public boolean hasRead() { + return actionCase_ == 20; + } + /** + * + * + *
+     * Action to do a normal read.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + * + * @return The read. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ReadAction getRead() { + if (readBuilder_ == null) { + if (actionCase_ == 20) { + return (com.google.spanner.executor.v1.ReadAction) action_; + } + return com.google.spanner.executor.v1.ReadAction.getDefaultInstance(); + } else { + if (actionCase_ == 20) { + return readBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ReadAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to do a normal read.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + */ + public Builder setRead(com.google.spanner.executor.v1.ReadAction value) { + if (readBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + readBuilder_.setMessage(value); + } + actionCase_ = 20; + return this; + } + /** + * + * + *
+     * Action to do a normal read.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + */ + public Builder setRead(com.google.spanner.executor.v1.ReadAction.Builder builderForValue) { + if (readBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + readBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 20; + return this; + } + /** + * + * + *
+     * Action to do a normal read.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + */ + public Builder mergeRead(com.google.spanner.executor.v1.ReadAction value) { + if (readBuilder_ == null) { + if (actionCase_ == 20 + && action_ != com.google.spanner.executor.v1.ReadAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.ReadAction.newBuilder( + (com.google.spanner.executor.v1.ReadAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 20) { + readBuilder_.mergeFrom(value); + } else { + readBuilder_.setMessage(value); + } + } + actionCase_ = 20; + return this; + } + /** + * + * + *
+     * Action to do a normal read.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + */ + public Builder clearRead() { + if (readBuilder_ == null) { + if (actionCase_ == 20) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 20) { + actionCase_ = 0; + action_ = null; + } + readBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to do a normal read.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + */ + public com.google.spanner.executor.v1.ReadAction.Builder getReadBuilder() { + return getReadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to do a normal read.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ReadActionOrBuilder getReadOrBuilder() { + if ((actionCase_ == 20) && (readBuilder_ != null)) { + return readBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 20) { + return (com.google.spanner.executor.v1.ReadAction) action_; + } + return com.google.spanner.executor.v1.ReadAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to do a normal read.
+     * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ReadAction, + com.google.spanner.executor.v1.ReadAction.Builder, + com.google.spanner.executor.v1.ReadActionOrBuilder> + getReadFieldBuilder() { + if (readBuilder_ == null) { + if (!(actionCase_ == 20)) { + action_ = com.google.spanner.executor.v1.ReadAction.getDefaultInstance(); + } + readBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ReadAction, + com.google.spanner.executor.v1.ReadAction.Builder, + com.google.spanner.executor.v1.ReadActionOrBuilder>( + (com.google.spanner.executor.v1.ReadAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 20; + onChanged(); + return readBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder> + queryBuilder_; + /** + * + * + *
+     * Action to do a query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return actionCase_ == 21; + } + /** + * + * + *
+     * Action to do a query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + * + * @return The query. + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryAction getQuery() { + if (queryBuilder_ == null) { + if (actionCase_ == 21) { + return (com.google.spanner.executor.v1.QueryAction) action_; + } + return com.google.spanner.executor.v1.QueryAction.getDefaultInstance(); + } else { + if (actionCase_ == 21) { + return queryBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.QueryAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to do a query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + */ + public Builder setQuery(com.google.spanner.executor.v1.QueryAction value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + queryBuilder_.setMessage(value); + } + actionCase_ = 21; + return this; + } + /** + * + * + *
+     * Action to do a query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + */ + public Builder setQuery(com.google.spanner.executor.v1.QueryAction.Builder builderForValue) { + if (queryBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 21; + return this; + } + /** + * + * + *
+     * Action to do a query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + */ + public Builder mergeQuery(com.google.spanner.executor.v1.QueryAction value) { + if (queryBuilder_ == null) { + if (actionCase_ == 21 + && action_ != com.google.spanner.executor.v1.QueryAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.QueryAction.newBuilder( + (com.google.spanner.executor.v1.QueryAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 21) { + queryBuilder_.mergeFrom(value); + } else { + queryBuilder_.setMessage(value); + } + } + actionCase_ = 21; + return this; + } + /** + * + * + *
+     * Action to do a query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + */ + public Builder clearQuery() { + if (queryBuilder_ == null) { + if (actionCase_ == 21) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 21) { + actionCase_ = 0; + action_ = null; + } + queryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to do a query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + */ + public com.google.spanner.executor.v1.QueryAction.Builder getQueryBuilder() { + return getQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to do a query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryActionOrBuilder getQueryOrBuilder() { + if ((actionCase_ == 21) && (queryBuilder_ != null)) { + return queryBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 21) { + return (com.google.spanner.executor.v1.QueryAction) action_; + } + return com.google.spanner.executor.v1.QueryAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to do a query.
+     * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + if (!(actionCase_ == 21)) { + action_ = com.google.spanner.executor.v1.QueryAction.getDefaultInstance(); + } + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryAction, + com.google.spanner.executor.v1.QueryAction.Builder, + com.google.spanner.executor.v1.QueryActionOrBuilder>( + (com.google.spanner.executor.v1.QueryAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 21; + onChanged(); + return queryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction, + com.google.spanner.executor.v1.MutationAction.Builder, + com.google.spanner.executor.v1.MutationActionOrBuilder> + mutationBuilder_; + /** + * + * + *
+     * Action to buffer a mutation.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + * + * @return Whether the mutation field is set. + */ + @java.lang.Override + public boolean hasMutation() { + return actionCase_ == 22; + } + /** + * + * + *
+     * Action to buffer a mutation.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + * + * @return The mutation. + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction getMutation() { + if (mutationBuilder_ == null) { + if (actionCase_ == 22) { + return (com.google.spanner.executor.v1.MutationAction) action_; + } + return com.google.spanner.executor.v1.MutationAction.getDefaultInstance(); + } else { + if (actionCase_ == 22) { + return mutationBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.MutationAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to buffer a mutation.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + */ + public Builder setMutation(com.google.spanner.executor.v1.MutationAction value) { + if (mutationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + mutationBuilder_.setMessage(value); + } + actionCase_ = 22; + return this; + } + /** + * + * + *
+     * Action to buffer a mutation.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + */ + public Builder setMutation( + com.google.spanner.executor.v1.MutationAction.Builder builderForValue) { + if (mutationBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + mutationBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 22; + return this; + } + /** + * + * + *
+     * Action to buffer a mutation.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + */ + public Builder mergeMutation(com.google.spanner.executor.v1.MutationAction value) { + if (mutationBuilder_ == null) { + if (actionCase_ == 22 + && action_ != com.google.spanner.executor.v1.MutationAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.MutationAction.newBuilder( + (com.google.spanner.executor.v1.MutationAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 22) { + mutationBuilder_.mergeFrom(value); + } else { + mutationBuilder_.setMessage(value); + } + } + actionCase_ = 22; + return this; + } + /** + * + * + *
+     * Action to buffer a mutation.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + */ + public Builder clearMutation() { + if (mutationBuilder_ == null) { + if (actionCase_ == 22) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 22) { + actionCase_ = 0; + action_ = null; + } + mutationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to buffer a mutation.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + */ + public com.google.spanner.executor.v1.MutationAction.Builder getMutationBuilder() { + return getMutationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to buffer a mutation.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationActionOrBuilder getMutationOrBuilder() { + if ((actionCase_ == 22) && (mutationBuilder_ != null)) { + return mutationBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 22) { + return (com.google.spanner.executor.v1.MutationAction) action_; + } + return com.google.spanner.executor.v1.MutationAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to buffer a mutation.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction, + com.google.spanner.executor.v1.MutationAction.Builder, + com.google.spanner.executor.v1.MutationActionOrBuilder> + getMutationFieldBuilder() { + if (mutationBuilder_ == null) { + if (!(actionCase_ == 22)) { + action_ = com.google.spanner.executor.v1.MutationAction.getDefaultInstance(); + } + mutationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction, + com.google.spanner.executor.v1.MutationAction.Builder, + com.google.spanner.executor.v1.MutationActionOrBuilder>( + (com.google.spanner.executor.v1.MutationAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 22; + onChanged(); + return mutationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DmlAction, + com.google.spanner.executor.v1.DmlAction.Builder, + com.google.spanner.executor.v1.DmlActionOrBuilder> + dmlBuilder_; + /** + * + * + *
+     * Action to a DML.
+     * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + * + * @return Whether the dml field is set. + */ + @java.lang.Override + public boolean hasDml() { + return actionCase_ == 23; + } + /** + * + * + *
+     * Action to a DML.
+     * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + * + * @return The dml. + */ + @java.lang.Override + public com.google.spanner.executor.v1.DmlAction getDml() { + if (dmlBuilder_ == null) { + if (actionCase_ == 23) { + return (com.google.spanner.executor.v1.DmlAction) action_; + } + return com.google.spanner.executor.v1.DmlAction.getDefaultInstance(); + } else { + if (actionCase_ == 23) { + return dmlBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.DmlAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to a DML.
+     * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + */ + public Builder setDml(com.google.spanner.executor.v1.DmlAction value) { + if (dmlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + dmlBuilder_.setMessage(value); + } + actionCase_ = 23; + return this; + } + /** + * + * + *
+     * Action to a DML.
+     * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + */ + public Builder setDml(com.google.spanner.executor.v1.DmlAction.Builder builderForValue) { + if (dmlBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + dmlBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 23; + return this; + } + /** + * + * + *
+     * Action to a DML.
+     * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + */ + public Builder mergeDml(com.google.spanner.executor.v1.DmlAction value) { + if (dmlBuilder_ == null) { + if (actionCase_ == 23 + && action_ != com.google.spanner.executor.v1.DmlAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.DmlAction.newBuilder( + (com.google.spanner.executor.v1.DmlAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 23) { + dmlBuilder_.mergeFrom(value); + } else { + dmlBuilder_.setMessage(value); + } + } + actionCase_ = 23; + return this; + } + /** + * + * + *
+     * Action to a DML.
+     * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + */ + public Builder clearDml() { + if (dmlBuilder_ == null) { + if (actionCase_ == 23) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 23) { + actionCase_ = 0; + action_ = null; + } + dmlBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to a DML.
+     * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + */ + public com.google.spanner.executor.v1.DmlAction.Builder getDmlBuilder() { + return getDmlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to a DML.
+     * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + */ + @java.lang.Override + public com.google.spanner.executor.v1.DmlActionOrBuilder getDmlOrBuilder() { + if ((actionCase_ == 23) && (dmlBuilder_ != null)) { + return dmlBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 23) { + return (com.google.spanner.executor.v1.DmlAction) action_; + } + return com.google.spanner.executor.v1.DmlAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to a DML.
+     * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DmlAction, + com.google.spanner.executor.v1.DmlAction.Builder, + com.google.spanner.executor.v1.DmlActionOrBuilder> + getDmlFieldBuilder() { + if (dmlBuilder_ == null) { + if (!(actionCase_ == 23)) { + action_ = com.google.spanner.executor.v1.DmlAction.getDefaultInstance(); + } + dmlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.DmlAction, + com.google.spanner.executor.v1.DmlAction.Builder, + com.google.spanner.executor.v1.DmlActionOrBuilder>( + (com.google.spanner.executor.v1.DmlAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 23; + onChanged(); + return dmlBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.BatchDmlAction, + com.google.spanner.executor.v1.BatchDmlAction.Builder, + com.google.spanner.executor.v1.BatchDmlActionOrBuilder> + batchDmlBuilder_; + /** + * + * + *
+     * Action to a batch DML.
+     * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + * + * @return Whether the batchDml field is set. + */ + @java.lang.Override + public boolean hasBatchDml() { + return actionCase_ == 24; + } + /** + * + * + *
+     * Action to a batch DML.
+     * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + * + * @return The batchDml. + */ + @java.lang.Override + public com.google.spanner.executor.v1.BatchDmlAction getBatchDml() { + if (batchDmlBuilder_ == null) { + if (actionCase_ == 24) { + return (com.google.spanner.executor.v1.BatchDmlAction) action_; + } + return com.google.spanner.executor.v1.BatchDmlAction.getDefaultInstance(); + } else { + if (actionCase_ == 24) { + return batchDmlBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.BatchDmlAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to a batch DML.
+     * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + */ + public Builder setBatchDml(com.google.spanner.executor.v1.BatchDmlAction value) { + if (batchDmlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + batchDmlBuilder_.setMessage(value); + } + actionCase_ = 24; + return this; + } + /** + * + * + *
+     * Action to a batch DML.
+     * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + */ + public Builder setBatchDml( + com.google.spanner.executor.v1.BatchDmlAction.Builder builderForValue) { + if (batchDmlBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + batchDmlBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 24; + return this; + } + /** + * + * + *
+     * Action to a batch DML.
+     * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + */ + public Builder mergeBatchDml(com.google.spanner.executor.v1.BatchDmlAction value) { + if (batchDmlBuilder_ == null) { + if (actionCase_ == 24 + && action_ != com.google.spanner.executor.v1.BatchDmlAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.BatchDmlAction.newBuilder( + (com.google.spanner.executor.v1.BatchDmlAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 24) { + batchDmlBuilder_.mergeFrom(value); + } else { + batchDmlBuilder_.setMessage(value); + } + } + actionCase_ = 24; + return this; + } + /** + * + * + *
+     * Action to a batch DML.
+     * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + */ + public Builder clearBatchDml() { + if (batchDmlBuilder_ == null) { + if (actionCase_ == 24) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 24) { + actionCase_ = 0; + action_ = null; + } + batchDmlBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to a batch DML.
+     * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + */ + public com.google.spanner.executor.v1.BatchDmlAction.Builder getBatchDmlBuilder() { + return getBatchDmlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to a batch DML.
+     * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + */ + @java.lang.Override + public com.google.spanner.executor.v1.BatchDmlActionOrBuilder getBatchDmlOrBuilder() { + if ((actionCase_ == 24) && (batchDmlBuilder_ != null)) { + return batchDmlBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 24) { + return (com.google.spanner.executor.v1.BatchDmlAction) action_; + } + return com.google.spanner.executor.v1.BatchDmlAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to a batch DML.
+     * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.BatchDmlAction, + com.google.spanner.executor.v1.BatchDmlAction.Builder, + com.google.spanner.executor.v1.BatchDmlActionOrBuilder> + getBatchDmlFieldBuilder() { + if (batchDmlBuilder_ == null) { + if (!(actionCase_ == 24)) { + action_ = com.google.spanner.executor.v1.BatchDmlAction.getDefaultInstance(); + } + batchDmlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.BatchDmlAction, + com.google.spanner.executor.v1.BatchDmlAction.Builder, + com.google.spanner.executor.v1.BatchDmlActionOrBuilder>( + (com.google.spanner.executor.v1.BatchDmlAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 24; + onChanged(); + return batchDmlBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.WriteMutationsAction, + com.google.spanner.executor.v1.WriteMutationsAction.Builder, + com.google.spanner.executor.v1.WriteMutationsActionOrBuilder> + writeBuilder_; + /** + * + * + *
+     * Action to write a mutation.
+     * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + * + * @return Whether the write field is set. + */ + @java.lang.Override + public boolean hasWrite() { + return actionCase_ == 25; + } + /** + * + * + *
+     * Action to write a mutation.
+     * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + * + * @return The write. + */ + @java.lang.Override + public com.google.spanner.executor.v1.WriteMutationsAction getWrite() { + if (writeBuilder_ == null) { + if (actionCase_ == 25) { + return (com.google.spanner.executor.v1.WriteMutationsAction) action_; + } + return com.google.spanner.executor.v1.WriteMutationsAction.getDefaultInstance(); + } else { + if (actionCase_ == 25) { + return writeBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.WriteMutationsAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to write a mutation.
+     * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + */ + public Builder setWrite(com.google.spanner.executor.v1.WriteMutationsAction value) { + if (writeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + writeBuilder_.setMessage(value); + } + actionCase_ = 25; + return this; + } + /** + * + * + *
+     * Action to write a mutation.
+     * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + */ + public Builder setWrite( + com.google.spanner.executor.v1.WriteMutationsAction.Builder builderForValue) { + if (writeBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + writeBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 25; + return this; + } + /** + * + * + *
+     * Action to write a mutation.
+     * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + */ + public Builder mergeWrite(com.google.spanner.executor.v1.WriteMutationsAction value) { + if (writeBuilder_ == null) { + if (actionCase_ == 25 + && action_ + != com.google.spanner.executor.v1.WriteMutationsAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.WriteMutationsAction.newBuilder( + (com.google.spanner.executor.v1.WriteMutationsAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 25) { + writeBuilder_.mergeFrom(value); + } else { + writeBuilder_.setMessage(value); + } + } + actionCase_ = 25; + return this; + } + /** + * + * + *
+     * Action to write a mutation.
+     * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + */ + public Builder clearWrite() { + if (writeBuilder_ == null) { + if (actionCase_ == 25) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 25) { + actionCase_ = 0; + action_ = null; + } + writeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to write a mutation.
+     * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + */ + public com.google.spanner.executor.v1.WriteMutationsAction.Builder getWriteBuilder() { + return getWriteFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to write a mutation.
+     * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + */ + @java.lang.Override + public com.google.spanner.executor.v1.WriteMutationsActionOrBuilder getWriteOrBuilder() { + if ((actionCase_ == 25) && (writeBuilder_ != null)) { + return writeBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 25) { + return (com.google.spanner.executor.v1.WriteMutationsAction) action_; + } + return com.google.spanner.executor.v1.WriteMutationsAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to write a mutation.
+     * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.WriteMutationsAction, + com.google.spanner.executor.v1.WriteMutationsAction.Builder, + com.google.spanner.executor.v1.WriteMutationsActionOrBuilder> + getWriteFieldBuilder() { + if (writeBuilder_ == null) { + if (!(actionCase_ == 25)) { + action_ = com.google.spanner.executor.v1.WriteMutationsAction.getDefaultInstance(); + } + writeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.WriteMutationsAction, + com.google.spanner.executor.v1.WriteMutationsAction.Builder, + com.google.spanner.executor.v1.WriteMutationsActionOrBuilder>( + (com.google.spanner.executor.v1.WriteMutationsAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 25; + onChanged(); + return writeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.PartitionedUpdateAction, + com.google.spanner.executor.v1.PartitionedUpdateAction.Builder, + com.google.spanner.executor.v1.PartitionedUpdateActionOrBuilder> + partitionedUpdateBuilder_; + /** + * + * + *
+     * Action to a partitioned update.
+     * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + * + * @return Whether the partitionedUpdate field is set. + */ + @java.lang.Override + public boolean hasPartitionedUpdate() { + return actionCase_ == 27; + } + /** + * + * + *
+     * Action to a partitioned update.
+     * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + * + * @return The partitionedUpdate. + */ + @java.lang.Override + public com.google.spanner.executor.v1.PartitionedUpdateAction getPartitionedUpdate() { + if (partitionedUpdateBuilder_ == null) { + if (actionCase_ == 27) { + return (com.google.spanner.executor.v1.PartitionedUpdateAction) action_; + } + return com.google.spanner.executor.v1.PartitionedUpdateAction.getDefaultInstance(); + } else { + if (actionCase_ == 27) { + return partitionedUpdateBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.PartitionedUpdateAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to a partitioned update.
+     * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + */ + public Builder setPartitionedUpdate( + com.google.spanner.executor.v1.PartitionedUpdateAction value) { + if (partitionedUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + partitionedUpdateBuilder_.setMessage(value); + } + actionCase_ = 27; + return this; + } + /** + * + * + *
+     * Action to a partitioned update.
+     * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + */ + public Builder setPartitionedUpdate( + com.google.spanner.executor.v1.PartitionedUpdateAction.Builder builderForValue) { + if (partitionedUpdateBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + partitionedUpdateBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 27; + return this; + } + /** + * + * + *
+     * Action to a partitioned update.
+     * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + */ + public Builder mergePartitionedUpdate( + com.google.spanner.executor.v1.PartitionedUpdateAction value) { + if (partitionedUpdateBuilder_ == null) { + if (actionCase_ == 27 + && action_ + != com.google.spanner.executor.v1.PartitionedUpdateAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.PartitionedUpdateAction.newBuilder( + (com.google.spanner.executor.v1.PartitionedUpdateAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 27) { + partitionedUpdateBuilder_.mergeFrom(value); + } else { + partitionedUpdateBuilder_.setMessage(value); + } + } + actionCase_ = 27; + return this; + } + /** + * + * + *
+     * Action to a partitioned update.
+     * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + */ + public Builder clearPartitionedUpdate() { + if (partitionedUpdateBuilder_ == null) { + if (actionCase_ == 27) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 27) { + actionCase_ = 0; + action_ = null; + } + partitionedUpdateBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to a partitioned update.
+     * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + */ + public com.google.spanner.executor.v1.PartitionedUpdateAction.Builder + getPartitionedUpdateBuilder() { + return getPartitionedUpdateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to a partitioned update.
+     * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + */ + @java.lang.Override + public com.google.spanner.executor.v1.PartitionedUpdateActionOrBuilder + getPartitionedUpdateOrBuilder() { + if ((actionCase_ == 27) && (partitionedUpdateBuilder_ != null)) { + return partitionedUpdateBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 27) { + return (com.google.spanner.executor.v1.PartitionedUpdateAction) action_; + } + return com.google.spanner.executor.v1.PartitionedUpdateAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to a partitioned update.
+     * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.PartitionedUpdateAction, + com.google.spanner.executor.v1.PartitionedUpdateAction.Builder, + com.google.spanner.executor.v1.PartitionedUpdateActionOrBuilder> + getPartitionedUpdateFieldBuilder() { + if (partitionedUpdateBuilder_ == null) { + if (!(actionCase_ == 27)) { + action_ = com.google.spanner.executor.v1.PartitionedUpdateAction.getDefaultInstance(); + } + partitionedUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.PartitionedUpdateAction, + com.google.spanner.executor.v1.PartitionedUpdateAction.Builder, + com.google.spanner.executor.v1.PartitionedUpdateActionOrBuilder>( + (com.google.spanner.executor.v1.PartitionedUpdateAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 27; + onChanged(); + return partitionedUpdateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.AdminAction, + com.google.spanner.executor.v1.AdminAction.Builder, + com.google.spanner.executor.v1.AdminActionOrBuilder> + adminBuilder_; + /** + * + * + *
+     * Action that contains any administrative operation, like database,
+     * instance manipulation.
+     * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + * + * @return Whether the admin field is set. + */ + @java.lang.Override + public boolean hasAdmin() { + return actionCase_ == 30; + } + /** + * + * + *
+     * Action that contains any administrative operation, like database,
+     * instance manipulation.
+     * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + * + * @return The admin. + */ + @java.lang.Override + public com.google.spanner.executor.v1.AdminAction getAdmin() { + if (adminBuilder_ == null) { + if (actionCase_ == 30) { + return (com.google.spanner.executor.v1.AdminAction) action_; + } + return com.google.spanner.executor.v1.AdminAction.getDefaultInstance(); + } else { + if (actionCase_ == 30) { + return adminBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.AdminAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that contains any administrative operation, like database,
+     * instance manipulation.
+     * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + */ + public Builder setAdmin(com.google.spanner.executor.v1.AdminAction value) { + if (adminBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + adminBuilder_.setMessage(value); + } + actionCase_ = 30; + return this; + } + /** + * + * + *
+     * Action that contains any administrative operation, like database,
+     * instance manipulation.
+     * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + */ + public Builder setAdmin(com.google.spanner.executor.v1.AdminAction.Builder builderForValue) { + if (adminBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + adminBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 30; + return this; + } + /** + * + * + *
+     * Action that contains any administrative operation, like database,
+     * instance manipulation.
+     * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + */ + public Builder mergeAdmin(com.google.spanner.executor.v1.AdminAction value) { + if (adminBuilder_ == null) { + if (actionCase_ == 30 + && action_ != com.google.spanner.executor.v1.AdminAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.AdminAction.newBuilder( + (com.google.spanner.executor.v1.AdminAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 30) { + adminBuilder_.mergeFrom(value); + } else { + adminBuilder_.setMessage(value); + } + } + actionCase_ = 30; + return this; + } + /** + * + * + *
+     * Action that contains any administrative operation, like database,
+     * instance manipulation.
+     * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + */ + public Builder clearAdmin() { + if (adminBuilder_ == null) { + if (actionCase_ == 30) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 30) { + actionCase_ = 0; + action_ = null; + } + adminBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action that contains any administrative operation, like database,
+     * instance manipulation.
+     * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + */ + public com.google.spanner.executor.v1.AdminAction.Builder getAdminBuilder() { + return getAdminFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action that contains any administrative operation, like database,
+     * instance manipulation.
+     * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + */ + @java.lang.Override + public com.google.spanner.executor.v1.AdminActionOrBuilder getAdminOrBuilder() { + if ((actionCase_ == 30) && (adminBuilder_ != null)) { + return adminBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 30) { + return (com.google.spanner.executor.v1.AdminAction) action_; + } + return com.google.spanner.executor.v1.AdminAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action that contains any administrative operation, like database,
+     * instance manipulation.
+     * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.AdminAction, + com.google.spanner.executor.v1.AdminAction.Builder, + com.google.spanner.executor.v1.AdminActionOrBuilder> + getAdminFieldBuilder() { + if (adminBuilder_ == null) { + if (!(actionCase_ == 30)) { + action_ = com.google.spanner.executor.v1.AdminAction.getDefaultInstance(); + } + adminBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.AdminAction, + com.google.spanner.executor.v1.AdminAction.Builder, + com.google.spanner.executor.v1.AdminActionOrBuilder>( + (com.google.spanner.executor.v1.AdminAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 30; + onChanged(); + return adminBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.StartBatchTransactionAction, + com.google.spanner.executor.v1.StartBatchTransactionAction.Builder, + com.google.spanner.executor.v1.StartBatchTransactionActionOrBuilder> + startBatchTxnBuilder_; + /** + * + * + *
+     * Action to start a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + * + * @return Whether the startBatchTxn field is set. + */ + @java.lang.Override + public boolean hasStartBatchTxn() { + return actionCase_ == 40; + } + /** + * + * + *
+     * Action to start a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + * + * @return The startBatchTxn. + */ + @java.lang.Override + public com.google.spanner.executor.v1.StartBatchTransactionAction getStartBatchTxn() { + if (startBatchTxnBuilder_ == null) { + if (actionCase_ == 40) { + return (com.google.spanner.executor.v1.StartBatchTransactionAction) action_; + } + return com.google.spanner.executor.v1.StartBatchTransactionAction.getDefaultInstance(); + } else { + if (actionCase_ == 40) { + return startBatchTxnBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.StartBatchTransactionAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to start a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + */ + public Builder setStartBatchTxn( + com.google.spanner.executor.v1.StartBatchTransactionAction value) { + if (startBatchTxnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + startBatchTxnBuilder_.setMessage(value); + } + actionCase_ = 40; + return this; + } + /** + * + * + *
+     * Action to start a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + */ + public Builder setStartBatchTxn( + com.google.spanner.executor.v1.StartBatchTransactionAction.Builder builderForValue) { + if (startBatchTxnBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + startBatchTxnBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 40; + return this; + } + /** + * + * + *
+     * Action to start a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + */ + public Builder mergeStartBatchTxn( + com.google.spanner.executor.v1.StartBatchTransactionAction value) { + if (startBatchTxnBuilder_ == null) { + if (actionCase_ == 40 + && action_ + != com.google.spanner.executor.v1.StartBatchTransactionAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.StartBatchTransactionAction.newBuilder( + (com.google.spanner.executor.v1.StartBatchTransactionAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 40) { + startBatchTxnBuilder_.mergeFrom(value); + } else { + startBatchTxnBuilder_.setMessage(value); + } + } + actionCase_ = 40; + return this; + } + /** + * + * + *
+     * Action to start a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + */ + public Builder clearStartBatchTxn() { + if (startBatchTxnBuilder_ == null) { + if (actionCase_ == 40) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 40) { + actionCase_ = 0; + action_ = null; + } + startBatchTxnBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to start a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + */ + public com.google.spanner.executor.v1.StartBatchTransactionAction.Builder + getStartBatchTxnBuilder() { + return getStartBatchTxnFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to start a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + */ + @java.lang.Override + public com.google.spanner.executor.v1.StartBatchTransactionActionOrBuilder + getStartBatchTxnOrBuilder() { + if ((actionCase_ == 40) && (startBatchTxnBuilder_ != null)) { + return startBatchTxnBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 40) { + return (com.google.spanner.executor.v1.StartBatchTransactionAction) action_; + } + return com.google.spanner.executor.v1.StartBatchTransactionAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to start a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.StartBatchTransactionAction, + com.google.spanner.executor.v1.StartBatchTransactionAction.Builder, + com.google.spanner.executor.v1.StartBatchTransactionActionOrBuilder> + getStartBatchTxnFieldBuilder() { + if (startBatchTxnBuilder_ == null) { + if (!(actionCase_ == 40)) { + action_ = com.google.spanner.executor.v1.StartBatchTransactionAction.getDefaultInstance(); + } + startBatchTxnBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.StartBatchTransactionAction, + com.google.spanner.executor.v1.StartBatchTransactionAction.Builder, + com.google.spanner.executor.v1.StartBatchTransactionActionOrBuilder>( + (com.google.spanner.executor.v1.StartBatchTransactionAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 40; + onChanged(); + return startBatchTxnBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloseBatchTransactionAction, + com.google.spanner.executor.v1.CloseBatchTransactionAction.Builder, + com.google.spanner.executor.v1.CloseBatchTransactionActionOrBuilder> + closeBatchTxnBuilder_; + /** + * + * + *
+     * Action to close a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + * + * @return Whether the closeBatchTxn field is set. + */ + @java.lang.Override + public boolean hasCloseBatchTxn() { + return actionCase_ == 41; + } + /** + * + * + *
+     * Action to close a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + * + * @return The closeBatchTxn. + */ + @java.lang.Override + public com.google.spanner.executor.v1.CloseBatchTransactionAction getCloseBatchTxn() { + if (closeBatchTxnBuilder_ == null) { + if (actionCase_ == 41) { + return (com.google.spanner.executor.v1.CloseBatchTransactionAction) action_; + } + return com.google.spanner.executor.v1.CloseBatchTransactionAction.getDefaultInstance(); + } else { + if (actionCase_ == 41) { + return closeBatchTxnBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.CloseBatchTransactionAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to close a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + */ + public Builder setCloseBatchTxn( + com.google.spanner.executor.v1.CloseBatchTransactionAction value) { + if (closeBatchTxnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + closeBatchTxnBuilder_.setMessage(value); + } + actionCase_ = 41; + return this; + } + /** + * + * + *
+     * Action to close a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + */ + public Builder setCloseBatchTxn( + com.google.spanner.executor.v1.CloseBatchTransactionAction.Builder builderForValue) { + if (closeBatchTxnBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + closeBatchTxnBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 41; + return this; + } + /** + * + * + *
+     * Action to close a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + */ + public Builder mergeCloseBatchTxn( + com.google.spanner.executor.v1.CloseBatchTransactionAction value) { + if (closeBatchTxnBuilder_ == null) { + if (actionCase_ == 41 + && action_ + != com.google.spanner.executor.v1.CloseBatchTransactionAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.CloseBatchTransactionAction.newBuilder( + (com.google.spanner.executor.v1.CloseBatchTransactionAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 41) { + closeBatchTxnBuilder_.mergeFrom(value); + } else { + closeBatchTxnBuilder_.setMessage(value); + } + } + actionCase_ = 41; + return this; + } + /** + * + * + *
+     * Action to close a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + */ + public Builder clearCloseBatchTxn() { + if (closeBatchTxnBuilder_ == null) { + if (actionCase_ == 41) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 41) { + actionCase_ = 0; + action_ = null; + } + closeBatchTxnBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to close a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + */ + public com.google.spanner.executor.v1.CloseBatchTransactionAction.Builder + getCloseBatchTxnBuilder() { + return getCloseBatchTxnFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to close a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + */ + @java.lang.Override + public com.google.spanner.executor.v1.CloseBatchTransactionActionOrBuilder + getCloseBatchTxnOrBuilder() { + if ((actionCase_ == 41) && (closeBatchTxnBuilder_ != null)) { + return closeBatchTxnBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 41) { + return (com.google.spanner.executor.v1.CloseBatchTransactionAction) action_; + } + return com.google.spanner.executor.v1.CloseBatchTransactionAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to close a batch transaction.
+     * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloseBatchTransactionAction, + com.google.spanner.executor.v1.CloseBatchTransactionAction.Builder, + com.google.spanner.executor.v1.CloseBatchTransactionActionOrBuilder> + getCloseBatchTxnFieldBuilder() { + if (closeBatchTxnBuilder_ == null) { + if (!(actionCase_ == 41)) { + action_ = com.google.spanner.executor.v1.CloseBatchTransactionAction.getDefaultInstance(); + } + closeBatchTxnBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.CloseBatchTransactionAction, + com.google.spanner.executor.v1.CloseBatchTransactionAction.Builder, + com.google.spanner.executor.v1.CloseBatchTransactionActionOrBuilder>( + (com.google.spanner.executor.v1.CloseBatchTransactionAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 41; + onChanged(); + return closeBatchTxnBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction, + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.Builder, + com.google.spanner.executor.v1.GenerateDbPartitionsForReadActionOrBuilder> + generateDbPartitionsReadBuilder_; + /** + * + * + *
+     * Action to generate database partitions for batch read.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + * + * @return Whether the generateDbPartitionsRead field is set. + */ + @java.lang.Override + public boolean hasGenerateDbPartitionsRead() { + return actionCase_ == 42; + } + /** + * + * + *
+     * Action to generate database partitions for batch read.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + * + * @return The generateDbPartitionsRead. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction + getGenerateDbPartitionsRead() { + if (generateDbPartitionsReadBuilder_ == null) { + if (actionCase_ == 42) { + return (com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction) action_; + } + return com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction + .getDefaultInstance(); + } else { + if (actionCase_ == 42) { + return generateDbPartitionsReadBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to generate database partitions for batch read.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + */ + public Builder setGenerateDbPartitionsRead( + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction value) { + if (generateDbPartitionsReadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + generateDbPartitionsReadBuilder_.setMessage(value); + } + actionCase_ = 42; + return this; + } + /** + * + * + *
+     * Action to generate database partitions for batch read.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + */ + public Builder setGenerateDbPartitionsRead( + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.Builder builderForValue) { + if (generateDbPartitionsReadBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + generateDbPartitionsReadBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 42; + return this; + } + /** + * + * + *
+     * Action to generate database partitions for batch read.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + */ + public Builder mergeGenerateDbPartitionsRead( + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction value) { + if (generateDbPartitionsReadBuilder_ == null) { + if (actionCase_ == 42 + && action_ + != com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.newBuilder( + (com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 42) { + generateDbPartitionsReadBuilder_.mergeFrom(value); + } else { + generateDbPartitionsReadBuilder_.setMessage(value); + } + } + actionCase_ = 42; + return this; + } + /** + * + * + *
+     * Action to generate database partitions for batch read.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + */ + public Builder clearGenerateDbPartitionsRead() { + if (generateDbPartitionsReadBuilder_ == null) { + if (actionCase_ == 42) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 42) { + actionCase_ = 0; + action_ = null; + } + generateDbPartitionsReadBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to generate database partitions for batch read.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + */ + public com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.Builder + getGenerateDbPartitionsReadBuilder() { + return getGenerateDbPartitionsReadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to generate database partitions for batch read.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForReadActionOrBuilder + getGenerateDbPartitionsReadOrBuilder() { + if ((actionCase_ == 42) && (generateDbPartitionsReadBuilder_ != null)) { + return generateDbPartitionsReadBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 42) { + return (com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction) action_; + } + return com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to generate database partitions for batch read.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction, + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.Builder, + com.google.spanner.executor.v1.GenerateDbPartitionsForReadActionOrBuilder> + getGenerateDbPartitionsReadFieldBuilder() { + if (generateDbPartitionsReadBuilder_ == null) { + if (!(actionCase_ == 42)) { + action_ = + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.getDefaultInstance(); + } + generateDbPartitionsReadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction, + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction.Builder, + com.google.spanner.executor.v1.GenerateDbPartitionsForReadActionOrBuilder>( + (com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 42; + onChanged(); + return generateDbPartitionsReadBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction, + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.Builder, + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryActionOrBuilder> + generateDbPartitionsQueryBuilder_; + /** + * + * + *
+     * Action to generate database partitions for batch query.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + * + * @return Whether the generateDbPartitionsQuery field is set. + */ + @java.lang.Override + public boolean hasGenerateDbPartitionsQuery() { + return actionCase_ == 43; + } + /** + * + * + *
+     * Action to generate database partitions for batch query.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + * + * @return The generateDbPartitionsQuery. + */ + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction + getGenerateDbPartitionsQuery() { + if (generateDbPartitionsQueryBuilder_ == null) { + if (actionCase_ == 43) { + return (com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) action_; + } + return com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction + .getDefaultInstance(); + } else { + if (actionCase_ == 43) { + return generateDbPartitionsQueryBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to generate database partitions for batch query.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + */ + public Builder setGenerateDbPartitionsQuery( + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction value) { + if (generateDbPartitionsQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + generateDbPartitionsQueryBuilder_.setMessage(value); + } + actionCase_ = 43; + return this; + } + /** + * + * + *
+     * Action to generate database partitions for batch query.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + */ + public Builder setGenerateDbPartitionsQuery( + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.Builder builderForValue) { + if (generateDbPartitionsQueryBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + generateDbPartitionsQueryBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 43; + return this; + } + /** + * + * + *
+     * Action to generate database partitions for batch query.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + */ + public Builder mergeGenerateDbPartitionsQuery( + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction value) { + if (generateDbPartitionsQueryBuilder_ == null) { + if (actionCase_ == 43 + && action_ + != com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction + .getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.newBuilder( + (com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 43) { + generateDbPartitionsQueryBuilder_.mergeFrom(value); + } else { + generateDbPartitionsQueryBuilder_.setMessage(value); + } + } + actionCase_ = 43; + return this; + } + /** + * + * + *
+     * Action to generate database partitions for batch query.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + */ + public Builder clearGenerateDbPartitionsQuery() { + if (generateDbPartitionsQueryBuilder_ == null) { + if (actionCase_ == 43) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 43) { + actionCase_ = 0; + action_ = null; + } + generateDbPartitionsQueryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to generate database partitions for batch query.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + */ + public com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.Builder + getGenerateDbPartitionsQueryBuilder() { + return getGenerateDbPartitionsQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to generate database partitions for batch query.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.GenerateDbPartitionsForQueryActionOrBuilder + getGenerateDbPartitionsQueryOrBuilder() { + if ((actionCase_ == 43) && (generateDbPartitionsQueryBuilder_ != null)) { + return generateDbPartitionsQueryBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 43) { + return (com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) action_; + } + return com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to generate database partitions for batch query.
+     * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction, + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.Builder, + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryActionOrBuilder> + getGenerateDbPartitionsQueryFieldBuilder() { + if (generateDbPartitionsQueryBuilder_ == null) { + if (!(actionCase_ == 43)) { + action_ = + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction + .getDefaultInstance(); + } + generateDbPartitionsQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction, + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction.Builder, + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryActionOrBuilder>( + (com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 43; + onChanged(); + return generateDbPartitionsQueryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ExecutePartitionAction, + com.google.spanner.executor.v1.ExecutePartitionAction.Builder, + com.google.spanner.executor.v1.ExecutePartitionActionOrBuilder> + executePartitionBuilder_; + /** + * + * + *
+     * Action to execute batch actions on generated partitions.
+     * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + * + * @return Whether the executePartition field is set. + */ + @java.lang.Override + public boolean hasExecutePartition() { + return actionCase_ == 44; + } + /** + * + * + *
+     * Action to execute batch actions on generated partitions.
+     * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + * + * @return The executePartition. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ExecutePartitionAction getExecutePartition() { + if (executePartitionBuilder_ == null) { + if (actionCase_ == 44) { + return (com.google.spanner.executor.v1.ExecutePartitionAction) action_; + } + return com.google.spanner.executor.v1.ExecutePartitionAction.getDefaultInstance(); + } else { + if (actionCase_ == 44) { + return executePartitionBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ExecutePartitionAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to execute batch actions on generated partitions.
+     * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + */ + public Builder setExecutePartition( + com.google.spanner.executor.v1.ExecutePartitionAction value) { + if (executePartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + executePartitionBuilder_.setMessage(value); + } + actionCase_ = 44; + return this; + } + /** + * + * + *
+     * Action to execute batch actions on generated partitions.
+     * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + */ + public Builder setExecutePartition( + com.google.spanner.executor.v1.ExecutePartitionAction.Builder builderForValue) { + if (executePartitionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + executePartitionBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 44; + return this; + } + /** + * + * + *
+     * Action to execute batch actions on generated partitions.
+     * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + */ + public Builder mergeExecutePartition( + com.google.spanner.executor.v1.ExecutePartitionAction value) { + if (executePartitionBuilder_ == null) { + if (actionCase_ == 44 + && action_ + != com.google.spanner.executor.v1.ExecutePartitionAction.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.ExecutePartitionAction.newBuilder( + (com.google.spanner.executor.v1.ExecutePartitionAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 44) { + executePartitionBuilder_.mergeFrom(value); + } else { + executePartitionBuilder_.setMessage(value); + } + } + actionCase_ = 44; + return this; + } + /** + * + * + *
+     * Action to execute batch actions on generated partitions.
+     * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + */ + public Builder clearExecutePartition() { + if (executePartitionBuilder_ == null) { + if (actionCase_ == 44) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 44) { + actionCase_ = 0; + action_ = null; + } + executePartitionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to execute batch actions on generated partitions.
+     * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + */ + public com.google.spanner.executor.v1.ExecutePartitionAction.Builder + getExecutePartitionBuilder() { + return getExecutePartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to execute batch actions on generated partitions.
+     * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ExecutePartitionActionOrBuilder + getExecutePartitionOrBuilder() { + if ((actionCase_ == 44) && (executePartitionBuilder_ != null)) { + return executePartitionBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 44) { + return (com.google.spanner.executor.v1.ExecutePartitionAction) action_; + } + return com.google.spanner.executor.v1.ExecutePartitionAction.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to execute batch actions on generated partitions.
+     * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ExecutePartitionAction, + com.google.spanner.executor.v1.ExecutePartitionAction.Builder, + com.google.spanner.executor.v1.ExecutePartitionActionOrBuilder> + getExecutePartitionFieldBuilder() { + if (executePartitionBuilder_ == null) { + if (!(actionCase_ == 44)) { + action_ = com.google.spanner.executor.v1.ExecutePartitionAction.getDefaultInstance(); + } + executePartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ExecutePartitionAction, + com.google.spanner.executor.v1.ExecutePartitionAction.Builder, + com.google.spanner.executor.v1.ExecutePartitionActionOrBuilder>( + (com.google.spanner.executor.v1.ExecutePartitionAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 44; + onChanged(); + return executePartitionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ExecuteChangeStreamQuery, + com.google.spanner.executor.v1.ExecuteChangeStreamQuery.Builder, + com.google.spanner.executor.v1.ExecuteChangeStreamQueryOrBuilder> + executeChangeStreamQueryBuilder_; + /** + * + * + *
+     * Action to execute change stream query.
+     * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + * + * @return Whether the executeChangeStreamQuery field is set. + */ + @java.lang.Override + public boolean hasExecuteChangeStreamQuery() { + return actionCase_ == 50; + } + /** + * + * + *
+     * Action to execute change stream query.
+     * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + * + * @return The executeChangeStreamQuery. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ExecuteChangeStreamQuery getExecuteChangeStreamQuery() { + if (executeChangeStreamQueryBuilder_ == null) { + if (actionCase_ == 50) { + return (com.google.spanner.executor.v1.ExecuteChangeStreamQuery) action_; + } + return com.google.spanner.executor.v1.ExecuteChangeStreamQuery.getDefaultInstance(); + } else { + if (actionCase_ == 50) { + return executeChangeStreamQueryBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ExecuteChangeStreamQuery.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to execute change stream query.
+     * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + */ + public Builder setExecuteChangeStreamQuery( + com.google.spanner.executor.v1.ExecuteChangeStreamQuery value) { + if (executeChangeStreamQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + executeChangeStreamQueryBuilder_.setMessage(value); + } + actionCase_ = 50; + return this; + } + /** + * + * + *
+     * Action to execute change stream query.
+     * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + */ + public Builder setExecuteChangeStreamQuery( + com.google.spanner.executor.v1.ExecuteChangeStreamQuery.Builder builderForValue) { + if (executeChangeStreamQueryBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + executeChangeStreamQueryBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 50; + return this; + } + /** + * + * + *
+     * Action to execute change stream query.
+     * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + */ + public Builder mergeExecuteChangeStreamQuery( + com.google.spanner.executor.v1.ExecuteChangeStreamQuery value) { + if (executeChangeStreamQueryBuilder_ == null) { + if (actionCase_ == 50 + && action_ + != com.google.spanner.executor.v1.ExecuteChangeStreamQuery.getDefaultInstance()) { + action_ = + com.google.spanner.executor.v1.ExecuteChangeStreamQuery.newBuilder( + (com.google.spanner.executor.v1.ExecuteChangeStreamQuery) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 50) { + executeChangeStreamQueryBuilder_.mergeFrom(value); + } else { + executeChangeStreamQueryBuilder_.setMessage(value); + } + } + actionCase_ = 50; + return this; + } + /** + * + * + *
+     * Action to execute change stream query.
+     * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + */ + public Builder clearExecuteChangeStreamQuery() { + if (executeChangeStreamQueryBuilder_ == null) { + if (actionCase_ == 50) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 50) { + actionCase_ = 0; + action_ = null; + } + executeChangeStreamQueryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Action to execute change stream query.
+     * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + */ + public com.google.spanner.executor.v1.ExecuteChangeStreamQuery.Builder + getExecuteChangeStreamQueryBuilder() { + return getExecuteChangeStreamQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Action to execute change stream query.
+     * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ExecuteChangeStreamQueryOrBuilder + getExecuteChangeStreamQueryOrBuilder() { + if ((actionCase_ == 50) && (executeChangeStreamQueryBuilder_ != null)) { + return executeChangeStreamQueryBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 50) { + return (com.google.spanner.executor.v1.ExecuteChangeStreamQuery) action_; + } + return com.google.spanner.executor.v1.ExecuteChangeStreamQuery.getDefaultInstance(); + } + } + /** + * + * + *
+     * Action to execute change stream query.
+     * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ExecuteChangeStreamQuery, + com.google.spanner.executor.v1.ExecuteChangeStreamQuery.Builder, + com.google.spanner.executor.v1.ExecuteChangeStreamQueryOrBuilder> + getExecuteChangeStreamQueryFieldBuilder() { + if (executeChangeStreamQueryBuilder_ == null) { + if (!(actionCase_ == 50)) { + action_ = com.google.spanner.executor.v1.ExecuteChangeStreamQuery.getDefaultInstance(); + } + executeChangeStreamQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ExecuteChangeStreamQuery, + com.google.spanner.executor.v1.ExecuteChangeStreamQuery.Builder, + com.google.spanner.executor.v1.ExecuteChangeStreamQueryOrBuilder>( + (com.google.spanner.executor.v1.ExecuteChangeStreamQuery) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 50; + onChanged(); + return executeChangeStreamQueryBuilder_; + } + + @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.executor.v1.SpannerAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.SpannerAction) + private static final com.google.spanner.executor.v1.SpannerAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.SpannerAction(); + } + + public static com.google.spanner.executor.v1.SpannerAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpannerAction 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.executor.v1.SpannerAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOrBuilder.java new file mode 100644 index 00000000000..9925dc008c2 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOrBuilder.java @@ -0,0 +1,637 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface SpannerActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.SpannerAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Database against which to perform action.
+   * In a context where a series of actions take place, an action may omit
+   * database path if it applies to the same database as the previous action.
+   * 
+ * + * string database_path = 1; + * + * @return The databasePath. + */ + java.lang.String getDatabasePath(); + /** + * + * + *
+   * Database against which to perform action.
+   * In a context where a series of actions take place, an action may omit
+   * database path if it applies to the same database as the previous action.
+   * 
+ * + * string database_path = 1; + * + * @return The bytes for databasePath. + */ + com.google.protobuf.ByteString getDatabasePathBytes(); + + /** + * + * + *
+   * Action to start a transaction.
+   * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + * + * @return Whether the start field is set. + */ + boolean hasStart(); + /** + * + * + *
+   * Action to start a transaction.
+   * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + * + * @return The start. + */ + com.google.spanner.executor.v1.StartTransactionAction getStart(); + /** + * + * + *
+   * Action to start a transaction.
+   * 
+ * + * .google.spanner.executor.v1.StartTransactionAction start = 10; + */ + com.google.spanner.executor.v1.StartTransactionActionOrBuilder getStartOrBuilder(); + + /** + * + * + *
+   * Action to finish a transaction.
+   * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + * + * @return Whether the finish field is set. + */ + boolean hasFinish(); + /** + * + * + *
+   * Action to finish a transaction.
+   * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + * + * @return The finish. + */ + com.google.spanner.executor.v1.FinishTransactionAction getFinish(); + /** + * + * + *
+   * Action to finish a transaction.
+   * 
+ * + * .google.spanner.executor.v1.FinishTransactionAction finish = 11; + */ + com.google.spanner.executor.v1.FinishTransactionActionOrBuilder getFinishOrBuilder(); + + /** + * + * + *
+   * Action to do a normal read.
+   * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + * + * @return Whether the read field is set. + */ + boolean hasRead(); + /** + * + * + *
+   * Action to do a normal read.
+   * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + * + * @return The read. + */ + com.google.spanner.executor.v1.ReadAction getRead(); + /** + * + * + *
+   * Action to do a normal read.
+   * 
+ * + * .google.spanner.executor.v1.ReadAction read = 20; + */ + com.google.spanner.executor.v1.ReadActionOrBuilder getReadOrBuilder(); + + /** + * + * + *
+   * Action to do a query.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + /** + * + * + *
+   * Action to do a query.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + * + * @return The query. + */ + com.google.spanner.executor.v1.QueryAction getQuery(); + /** + * + * + *
+   * Action to do a query.
+   * 
+ * + * .google.spanner.executor.v1.QueryAction query = 21; + */ + com.google.spanner.executor.v1.QueryActionOrBuilder getQueryOrBuilder(); + + /** + * + * + *
+   * Action to buffer a mutation.
+   * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + * + * @return Whether the mutation field is set. + */ + boolean hasMutation(); + /** + * + * + *
+   * Action to buffer a mutation.
+   * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + * + * @return The mutation. + */ + com.google.spanner.executor.v1.MutationAction getMutation(); + /** + * + * + *
+   * Action to buffer a mutation.
+   * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 22; + */ + com.google.spanner.executor.v1.MutationActionOrBuilder getMutationOrBuilder(); + + /** + * + * + *
+   * Action to a DML.
+   * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + * + * @return Whether the dml field is set. + */ + boolean hasDml(); + /** + * + * + *
+   * Action to a DML.
+   * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + * + * @return The dml. + */ + com.google.spanner.executor.v1.DmlAction getDml(); + /** + * + * + *
+   * Action to a DML.
+   * 
+ * + * .google.spanner.executor.v1.DmlAction dml = 23; + */ + com.google.spanner.executor.v1.DmlActionOrBuilder getDmlOrBuilder(); + + /** + * + * + *
+   * Action to a batch DML.
+   * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + * + * @return Whether the batchDml field is set. + */ + boolean hasBatchDml(); + /** + * + * + *
+   * Action to a batch DML.
+   * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + * + * @return The batchDml. + */ + com.google.spanner.executor.v1.BatchDmlAction getBatchDml(); + /** + * + * + *
+   * Action to a batch DML.
+   * 
+ * + * .google.spanner.executor.v1.BatchDmlAction batch_dml = 24; + */ + com.google.spanner.executor.v1.BatchDmlActionOrBuilder getBatchDmlOrBuilder(); + + /** + * + * + *
+   * Action to write a mutation.
+   * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + * + * @return Whether the write field is set. + */ + boolean hasWrite(); + /** + * + * + *
+   * Action to write a mutation.
+   * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + * + * @return The write. + */ + com.google.spanner.executor.v1.WriteMutationsAction getWrite(); + /** + * + * + *
+   * Action to write a mutation.
+   * 
+ * + * .google.spanner.executor.v1.WriteMutationsAction write = 25; + */ + com.google.spanner.executor.v1.WriteMutationsActionOrBuilder getWriteOrBuilder(); + + /** + * + * + *
+   * Action to a partitioned update.
+   * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + * + * @return Whether the partitionedUpdate field is set. + */ + boolean hasPartitionedUpdate(); + /** + * + * + *
+   * Action to a partitioned update.
+   * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + * + * @return The partitionedUpdate. + */ + com.google.spanner.executor.v1.PartitionedUpdateAction getPartitionedUpdate(); + /** + * + * + *
+   * Action to a partitioned update.
+   * 
+ * + * .google.spanner.executor.v1.PartitionedUpdateAction partitioned_update = 27; + */ + com.google.spanner.executor.v1.PartitionedUpdateActionOrBuilder getPartitionedUpdateOrBuilder(); + + /** + * + * + *
+   * Action that contains any administrative operation, like database,
+   * instance manipulation.
+   * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + * + * @return Whether the admin field is set. + */ + boolean hasAdmin(); + /** + * + * + *
+   * Action that contains any administrative operation, like database,
+   * instance manipulation.
+   * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + * + * @return The admin. + */ + com.google.spanner.executor.v1.AdminAction getAdmin(); + /** + * + * + *
+   * Action that contains any administrative operation, like database,
+   * instance manipulation.
+   * 
+ * + * .google.spanner.executor.v1.AdminAction admin = 30; + */ + com.google.spanner.executor.v1.AdminActionOrBuilder getAdminOrBuilder(); + + /** + * + * + *
+   * Action to start a batch transaction.
+   * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + * + * @return Whether the startBatchTxn field is set. + */ + boolean hasStartBatchTxn(); + /** + * + * + *
+   * Action to start a batch transaction.
+   * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + * + * @return The startBatchTxn. + */ + com.google.spanner.executor.v1.StartBatchTransactionAction getStartBatchTxn(); + /** + * + * + *
+   * Action to start a batch transaction.
+   * 
+ * + * .google.spanner.executor.v1.StartBatchTransactionAction start_batch_txn = 40; + */ + com.google.spanner.executor.v1.StartBatchTransactionActionOrBuilder getStartBatchTxnOrBuilder(); + + /** + * + * + *
+   * Action to close a batch transaction.
+   * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + * + * @return Whether the closeBatchTxn field is set. + */ + boolean hasCloseBatchTxn(); + /** + * + * + *
+   * Action to close a batch transaction.
+   * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + * + * @return The closeBatchTxn. + */ + com.google.spanner.executor.v1.CloseBatchTransactionAction getCloseBatchTxn(); + /** + * + * + *
+   * Action to close a batch transaction.
+   * 
+ * + * .google.spanner.executor.v1.CloseBatchTransactionAction close_batch_txn = 41; + */ + com.google.spanner.executor.v1.CloseBatchTransactionActionOrBuilder getCloseBatchTxnOrBuilder(); + + /** + * + * + *
+   * Action to generate database partitions for batch read.
+   * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + * + * @return Whether the generateDbPartitionsRead field is set. + */ + boolean hasGenerateDbPartitionsRead(); + /** + * + * + *
+   * Action to generate database partitions for batch read.
+   * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + * + * @return The generateDbPartitionsRead. + */ + com.google.spanner.executor.v1.GenerateDbPartitionsForReadAction getGenerateDbPartitionsRead(); + /** + * + * + *
+   * Action to generate database partitions for batch read.
+   * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + * + */ + com.google.spanner.executor.v1.GenerateDbPartitionsForReadActionOrBuilder + getGenerateDbPartitionsReadOrBuilder(); + + /** + * + * + *
+   * Action to generate database partitions for batch query.
+   * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + * + * @return Whether the generateDbPartitionsQuery field is set. + */ + boolean hasGenerateDbPartitionsQuery(); + /** + * + * + *
+   * Action to generate database partitions for batch query.
+   * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + * + * @return The generateDbPartitionsQuery. + */ + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryAction getGenerateDbPartitionsQuery(); + /** + * + * + *
+   * Action to generate database partitions for batch query.
+   * 
+ * + * + * .google.spanner.executor.v1.GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + * + */ + com.google.spanner.executor.v1.GenerateDbPartitionsForQueryActionOrBuilder + getGenerateDbPartitionsQueryOrBuilder(); + + /** + * + * + *
+   * Action to execute batch actions on generated partitions.
+   * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + * + * @return Whether the executePartition field is set. + */ + boolean hasExecutePartition(); + /** + * + * + *
+   * Action to execute batch actions on generated partitions.
+   * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + * + * @return The executePartition. + */ + com.google.spanner.executor.v1.ExecutePartitionAction getExecutePartition(); + /** + * + * + *
+   * Action to execute batch actions on generated partitions.
+   * 
+ * + * .google.spanner.executor.v1.ExecutePartitionAction execute_partition = 44; + */ + com.google.spanner.executor.v1.ExecutePartitionActionOrBuilder getExecutePartitionOrBuilder(); + + /** + * + * + *
+   * Action to execute change stream query.
+   * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + * + * @return Whether the executeChangeStreamQuery field is set. + */ + boolean hasExecuteChangeStreamQuery(); + /** + * + * + *
+   * Action to execute change stream query.
+   * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + * + * @return The executeChangeStreamQuery. + */ + com.google.spanner.executor.v1.ExecuteChangeStreamQuery getExecuteChangeStreamQuery(); + /** + * + * + *
+   * Action to execute change stream query.
+   * 
+ * + * .google.spanner.executor.v1.ExecuteChangeStreamQuery execute_change_stream_query = 50; + * + */ + com.google.spanner.executor.v1.ExecuteChangeStreamQueryOrBuilder + getExecuteChangeStreamQueryOrBuilder(); + + com.google.spanner.executor.v1.SpannerAction.ActionCase getActionCase(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOutcome.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOutcome.java new file mode 100644 index 00000000000..bbae0a9f28f --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOutcome.java @@ -0,0 +1,3393 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * SpannerActionOutcome defines a result of execution of a single SpannerAction.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.SpannerActionOutcome} + */ +public final class SpannerActionOutcome extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.SpannerActionOutcome) + SpannerActionOutcomeOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpannerActionOutcome.newBuilder() to construct. + private SpannerActionOutcome(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpannerActionOutcome() { + batchTxnId_ = com.google.protobuf.ByteString.EMPTY; + dbPartition_ = java.util.Collections.emptyList(); + dmlRowsModified_ = emptyLongList(); + changeStreamRecords_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpannerActionOutcome(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerActionOutcome_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerActionOutcome_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.SpannerActionOutcome.class, + com.google.spanner.executor.v1.SpannerActionOutcome.Builder.class); + } + + private int bitField0_; + public static final int STATUS_FIELD_NUMBER = 1; + private com.google.rpc.Status status_; + /** + * + * + *
+   * If an outcome is split into multiple parts, status will be set only in the
+   * last part.
+   * 
+ * + * optional .google.rpc.Status status = 1; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * If an outcome is split into multiple parts, status will be set only in the
+   * last part.
+   * 
+ * + * optional .google.rpc.Status status = 1; + * + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + * + * + *
+   * If an outcome is split into multiple parts, status will be set only in the
+   * last part.
+   * 
+ * + * optional .google.rpc.Status status = 1; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + + public static final int COMMIT_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp commitTime_; + /** + * + * + *
+   * Transaction timestamp. It must be set for successful committed actions.
+   * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + * + * @return Whether the commitTime field is set. + */ + @java.lang.Override + public boolean hasCommitTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Transaction timestamp. It must be set for successful committed actions.
+   * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + * + * @return The commitTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCommitTime() { + return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_; + } + /** + * + * + *
+   * Transaction timestamp. It must be set for successful committed actions.
+   * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { + return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_; + } + + public static final int READ_RESULT_FIELD_NUMBER = 3; + private com.google.spanner.executor.v1.ReadResult readResult_; + /** + * + * + *
+   * Result of a ReadAction. This field must be set for ReadActions even if
+   * no rows were read.
+   * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + * + * @return Whether the readResult field is set. + */ + @java.lang.Override + public boolean hasReadResult() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Result of a ReadAction. This field must be set for ReadActions even if
+   * no rows were read.
+   * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + * + * @return The readResult. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ReadResult getReadResult() { + return readResult_ == null + ? com.google.spanner.executor.v1.ReadResult.getDefaultInstance() + : readResult_; + } + /** + * + * + *
+   * Result of a ReadAction. This field must be set for ReadActions even if
+   * no rows were read.
+   * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ReadResultOrBuilder getReadResultOrBuilder() { + return readResult_ == null + ? com.google.spanner.executor.v1.ReadResult.getDefaultInstance() + : readResult_; + } + + public static final int QUERY_RESULT_FIELD_NUMBER = 4; + private com.google.spanner.executor.v1.QueryResult queryResult_; + /** + * + * + *
+   * Result of a Query. This field must be set for Queries even if no rows were
+   * read.
+   * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + * + * @return Whether the queryResult field is set. + */ + @java.lang.Override + public boolean hasQueryResult() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Result of a Query. This field must be set for Queries even if no rows were
+   * read.
+   * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + * + * @return The queryResult. + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryResult getQueryResult() { + return queryResult_ == null + ? com.google.spanner.executor.v1.QueryResult.getDefaultInstance() + : queryResult_; + } + /** + * + * + *
+   * Result of a Query. This field must be set for Queries even if no rows were
+   * read.
+   * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + */ + @java.lang.Override + public com.google.spanner.executor.v1.QueryResultOrBuilder getQueryResultOrBuilder() { + return queryResult_ == null + ? com.google.spanner.executor.v1.QueryResult.getDefaultInstance() + : queryResult_; + } + + public static final int TRANSACTION_RESTARTED_FIELD_NUMBER = 5; + private boolean transactionRestarted_ = false; + /** + * + * + *
+   * This bit indicates that Spanner has restarted the current transaction. It
+   * means that the client should replay all the reads and writes.
+   * Setting it to true is only valid in the context of a read-write
+   * transaction, as an outcome of a committing FinishTransactionAction.
+   * 
+ * + * optional bool transaction_restarted = 5; + * + * @return Whether the transactionRestarted field is set. + */ + @java.lang.Override + public boolean hasTransactionRestarted() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * This bit indicates that Spanner has restarted the current transaction. It
+   * means that the client should replay all the reads and writes.
+   * Setting it to true is only valid in the context of a read-write
+   * transaction, as an outcome of a committing FinishTransactionAction.
+   * 
+ * + * optional bool transaction_restarted = 5; + * + * @return The transactionRestarted. + */ + @java.lang.Override + public boolean getTransactionRestarted() { + return transactionRestarted_; + } + + public static final int BATCH_TXN_ID_FIELD_NUMBER = 6; + private com.google.protobuf.ByteString batchTxnId_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+   * In successful StartBatchTransactionAction outcomes, this contains the ID of
+   * the transaction.
+   * 
+ * + * optional bytes batch_txn_id = 6; + * + * @return Whether the batchTxnId field is set. + */ + @java.lang.Override + public boolean hasBatchTxnId() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * In successful StartBatchTransactionAction outcomes, this contains the ID of
+   * the transaction.
+   * 
+ * + * optional bytes batch_txn_id = 6; + * + * @return The batchTxnId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBatchTxnId() { + return batchTxnId_; + } + + public static final int DB_PARTITION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List dbPartition_; + /** + * + * + *
+   * Generated database partitions (result of a
+   * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+   * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + @java.lang.Override + public java.util.List getDbPartitionList() { + return dbPartition_; + } + /** + * + * + *
+   * Generated database partitions (result of a
+   * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+   * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + @java.lang.Override + public java.util.List + getDbPartitionOrBuilderList() { + return dbPartition_; + } + /** + * + * + *
+   * Generated database partitions (result of a
+   * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+   * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + @java.lang.Override + public int getDbPartitionCount() { + return dbPartition_.size(); + } + /** + * + * + *
+   * Generated database partitions (result of a
+   * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+   * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + @java.lang.Override + public com.google.spanner.executor.v1.BatchPartition getDbPartition(int index) { + return dbPartition_.get(index); + } + /** + * + * + *
+   * Generated database partitions (result of a
+   * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+   * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + @java.lang.Override + public com.google.spanner.executor.v1.BatchPartitionOrBuilder getDbPartitionOrBuilder(int index) { + return dbPartition_.get(index); + } + + public static final int ADMIN_RESULT_FIELD_NUMBER = 8; + private com.google.spanner.executor.v1.AdminResult adminResult_; + /** + * + * + *
+   * Result of admin related actions.
+   * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + * + * @return Whether the adminResult field is set. + */ + @java.lang.Override + public boolean hasAdminResult() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Result of admin related actions.
+   * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + * + * @return The adminResult. + */ + @java.lang.Override + public com.google.spanner.executor.v1.AdminResult getAdminResult() { + return adminResult_ == null + ? com.google.spanner.executor.v1.AdminResult.getDefaultInstance() + : adminResult_; + } + /** + * + * + *
+   * Result of admin related actions.
+   * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + */ + @java.lang.Override + public com.google.spanner.executor.v1.AdminResultOrBuilder getAdminResultOrBuilder() { + return adminResult_ == null + ? com.google.spanner.executor.v1.AdminResult.getDefaultInstance() + : adminResult_; + } + + public static final int DML_ROWS_MODIFIED_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList dmlRowsModified_; + /** + * + * + *
+   * Stores rows modified by query in single DML or batch DML action.
+   * In case of batch DML action, stores 0 as row count of errored DML query.
+   * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @return A list containing the dmlRowsModified. + */ + @java.lang.Override + public java.util.List getDmlRowsModifiedList() { + return dmlRowsModified_; + } + /** + * + * + *
+   * Stores rows modified by query in single DML or batch DML action.
+   * In case of batch DML action, stores 0 as row count of errored DML query.
+   * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @return The count of dmlRowsModified. + */ + public int getDmlRowsModifiedCount() { + return dmlRowsModified_.size(); + } + /** + * + * + *
+   * Stores rows modified by query in single DML or batch DML action.
+   * In case of batch DML action, stores 0 as row count of errored DML query.
+   * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @param index The index of the element to return. + * @return The dmlRowsModified at the given index. + */ + public long getDmlRowsModified(int index) { + return dmlRowsModified_.getLong(index); + } + + private int dmlRowsModifiedMemoizedSerializedSize = -1; + + public static final int CHANGE_STREAM_RECORDS_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List changeStreamRecords_; + /** + * + * + *
+   * Change stream records returned by a change stream query.
+   * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + @java.lang.Override + public java.util.List + getChangeStreamRecordsList() { + return changeStreamRecords_; + } + /** + * + * + *
+   * Change stream records returned by a change stream query.
+   * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + @java.lang.Override + public java.util.List + getChangeStreamRecordsOrBuilderList() { + return changeStreamRecords_; + } + /** + * + * + *
+   * Change stream records returned by a change stream query.
+   * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + @java.lang.Override + public int getChangeStreamRecordsCount() { + return changeStreamRecords_.size(); + } + /** + * + * + *
+   * Change stream records returned by a change stream query.
+   * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ChangeStreamRecord getChangeStreamRecords(int index) { + return changeStreamRecords_.get(index); + } + /** + * + * + *
+   * Change stream records returned by a change stream query.
+   * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder getChangeStreamRecordsOrBuilder( + int index) { + return changeStreamRecords_.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 { + getSerializedSize(); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStatus()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCommitTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getReadResult()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getQueryResult()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeBool(5, transactionRestarted_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeBytes(6, batchTxnId_); + } + for (int i = 0; i < dbPartition_.size(); i++) { + output.writeMessage(7, dbPartition_.get(i)); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(8, getAdminResult()); + } + if (getDmlRowsModifiedList().size() > 0) { + output.writeUInt32NoTag(74); + output.writeUInt32NoTag(dmlRowsModifiedMemoizedSerializedSize); + } + for (int i = 0; i < dmlRowsModified_.size(); i++) { + output.writeInt64NoTag(dmlRowsModified_.getLong(i)); + } + for (int i = 0; i < changeStreamRecords_.size(); i++) { + output.writeMessage(10, changeStreamRecords_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStatus()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCommitTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getReadResult()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getQueryResult()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, transactionRestarted_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(6, batchTxnId_); + } + for (int i = 0; i < dbPartition_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, dbPartition_.get(i)); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getAdminResult()); + } + { + int dataSize = 0; + for (int i = 0; i < dmlRowsModified_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag( + dmlRowsModified_.getLong(i)); + } + size += dataSize; + if (!getDmlRowsModifiedList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + dmlRowsModifiedMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < changeStreamRecords_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(10, changeStreamRecords_.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.executor.v1.SpannerActionOutcome)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.SpannerActionOutcome other = + (com.google.spanner.executor.v1.SpannerActionOutcome) obj; + + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (hasCommitTime() != other.hasCommitTime()) return false; + if (hasCommitTime()) { + if (!getCommitTime().equals(other.getCommitTime())) return false; + } + if (hasReadResult() != other.hasReadResult()) return false; + if (hasReadResult()) { + if (!getReadResult().equals(other.getReadResult())) return false; + } + if (hasQueryResult() != other.hasQueryResult()) return false; + if (hasQueryResult()) { + if (!getQueryResult().equals(other.getQueryResult())) return false; + } + if (hasTransactionRestarted() != other.hasTransactionRestarted()) return false; + if (hasTransactionRestarted()) { + if (getTransactionRestarted() != other.getTransactionRestarted()) return false; + } + if (hasBatchTxnId() != other.hasBatchTxnId()) return false; + if (hasBatchTxnId()) { + if (!getBatchTxnId().equals(other.getBatchTxnId())) return false; + } + if (!getDbPartitionList().equals(other.getDbPartitionList())) return false; + if (hasAdminResult() != other.hasAdminResult()) return false; + if (hasAdminResult()) { + if (!getAdminResult().equals(other.getAdminResult())) return false; + } + if (!getDmlRowsModifiedList().equals(other.getDmlRowsModifiedList())) return false; + if (!getChangeStreamRecordsList().equals(other.getChangeStreamRecordsList())) 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 (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + if (hasCommitTime()) { + hash = (37 * hash) + COMMIT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCommitTime().hashCode(); + } + if (hasReadResult()) { + hash = (37 * hash) + READ_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getReadResult().hashCode(); + } + if (hasQueryResult()) { + hash = (37 * hash) + QUERY_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getQueryResult().hashCode(); + } + if (hasTransactionRestarted()) { + hash = (37 * hash) + TRANSACTION_RESTARTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTransactionRestarted()); + } + if (hasBatchTxnId()) { + hash = (37 * hash) + BATCH_TXN_ID_FIELD_NUMBER; + hash = (53 * hash) + getBatchTxnId().hashCode(); + } + if (getDbPartitionCount() > 0) { + hash = (37 * hash) + DB_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getDbPartitionList().hashCode(); + } + if (hasAdminResult()) { + hash = (37 * hash) + ADMIN_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getAdminResult().hashCode(); + } + if (getDmlRowsModifiedCount() > 0) { + hash = (37 * hash) + DML_ROWS_MODIFIED_FIELD_NUMBER; + hash = (53 * hash) + getDmlRowsModifiedList().hashCode(); + } + if (getChangeStreamRecordsCount() > 0) { + hash = (37 * hash) + CHANGE_STREAM_RECORDS_FIELD_NUMBER; + hash = (53 * hash) + getChangeStreamRecordsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.SpannerActionOutcome parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerActionOutcome 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.executor.v1.SpannerActionOutcome parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerActionOutcome 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.executor.v1.SpannerActionOutcome parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerActionOutcome parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.SpannerActionOutcome parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerActionOutcome 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.executor.v1.SpannerActionOutcome parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerActionOutcome 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.executor.v1.SpannerActionOutcome parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerActionOutcome 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.executor.v1.SpannerActionOutcome 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; + } + /** + * + * + *
+   * SpannerActionOutcome defines a result of execution of a single SpannerAction.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.SpannerActionOutcome} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.SpannerActionOutcome) + com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerActionOutcome_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerActionOutcome_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.SpannerActionOutcome.class, + com.google.spanner.executor.v1.SpannerActionOutcome.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.SpannerActionOutcome.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStatusFieldBuilder(); + getCommitTimeFieldBuilder(); + getReadResultFieldBuilder(); + getQueryResultFieldBuilder(); + getDbPartitionFieldBuilder(); + getAdminResultFieldBuilder(); + getChangeStreamRecordsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + commitTime_ = null; + if (commitTimeBuilder_ != null) { + commitTimeBuilder_.dispose(); + commitTimeBuilder_ = null; + } + readResult_ = null; + if (readResultBuilder_ != null) { + readResultBuilder_.dispose(); + readResultBuilder_ = null; + } + queryResult_ = null; + if (queryResultBuilder_ != null) { + queryResultBuilder_.dispose(); + queryResultBuilder_ = null; + } + transactionRestarted_ = false; + batchTxnId_ = com.google.protobuf.ByteString.EMPTY; + if (dbPartitionBuilder_ == null) { + dbPartition_ = java.util.Collections.emptyList(); + } else { + dbPartition_ = null; + dbPartitionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + adminResult_ = null; + if (adminResultBuilder_ != null) { + adminResultBuilder_.dispose(); + adminResultBuilder_ = null; + } + dmlRowsModified_ = emptyLongList(); + if (changeStreamRecordsBuilder_ == null) { + changeStreamRecords_ = java.util.Collections.emptyList(); + } else { + changeStreamRecords_ = null; + changeStreamRecordsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerActionOutcome_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerActionOutcome getDefaultInstanceForType() { + return com.google.spanner.executor.v1.SpannerActionOutcome.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerActionOutcome build() { + com.google.spanner.executor.v1.SpannerActionOutcome result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerActionOutcome buildPartial() { + com.google.spanner.executor.v1.SpannerActionOutcome result = + new com.google.spanner.executor.v1.SpannerActionOutcome(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.SpannerActionOutcome result) { + if (dbPartitionBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + dbPartition_ = java.util.Collections.unmodifiableList(dbPartition_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.dbPartition_ = dbPartition_; + } else { + result.dbPartition_ = dbPartitionBuilder_.build(); + } + if (((bitField0_ & 0x00000100) != 0)) { + dmlRowsModified_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.dmlRowsModified_ = dmlRowsModified_; + if (changeStreamRecordsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + changeStreamRecords_ = java.util.Collections.unmodifiableList(changeStreamRecords_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.changeStreamRecords_ = changeStreamRecords_; + } else { + result.changeStreamRecords_ = changeStreamRecordsBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.SpannerActionOutcome result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.commitTime_ = commitTimeBuilder_ == null ? commitTime_ : commitTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.readResult_ = readResultBuilder_ == null ? readResult_ : readResultBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.queryResult_ = + queryResultBuilder_ == null ? queryResult_ : queryResultBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.transactionRestarted_ = transactionRestarted_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.batchTxnId_ = batchTxnId_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.adminResult_ = + adminResultBuilder_ == null ? adminResult_ : adminResultBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + result.bitField0_ |= to_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.executor.v1.SpannerActionOutcome) { + return mergeFrom((com.google.spanner.executor.v1.SpannerActionOutcome) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.SpannerActionOutcome other) { + if (other == com.google.spanner.executor.v1.SpannerActionOutcome.getDefaultInstance()) + return this; + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.hasCommitTime()) { + mergeCommitTime(other.getCommitTime()); + } + if (other.hasReadResult()) { + mergeReadResult(other.getReadResult()); + } + if (other.hasQueryResult()) { + mergeQueryResult(other.getQueryResult()); + } + if (other.hasTransactionRestarted()) { + setTransactionRestarted(other.getTransactionRestarted()); + } + if (other.hasBatchTxnId()) { + setBatchTxnId(other.getBatchTxnId()); + } + if (dbPartitionBuilder_ == null) { + if (!other.dbPartition_.isEmpty()) { + if (dbPartition_.isEmpty()) { + dbPartition_ = other.dbPartition_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureDbPartitionIsMutable(); + dbPartition_.addAll(other.dbPartition_); + } + onChanged(); + } + } else { + if (!other.dbPartition_.isEmpty()) { + if (dbPartitionBuilder_.isEmpty()) { + dbPartitionBuilder_.dispose(); + dbPartitionBuilder_ = null; + dbPartition_ = other.dbPartition_; + bitField0_ = (bitField0_ & ~0x00000040); + dbPartitionBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDbPartitionFieldBuilder() + : null; + } else { + dbPartitionBuilder_.addAllMessages(other.dbPartition_); + } + } + } + if (other.hasAdminResult()) { + mergeAdminResult(other.getAdminResult()); + } + if (!other.dmlRowsModified_.isEmpty()) { + if (dmlRowsModified_.isEmpty()) { + dmlRowsModified_ = other.dmlRowsModified_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureDmlRowsModifiedIsMutable(); + dmlRowsModified_.addAll(other.dmlRowsModified_); + } + onChanged(); + } + if (changeStreamRecordsBuilder_ == null) { + if (!other.changeStreamRecords_.isEmpty()) { + if (changeStreamRecords_.isEmpty()) { + changeStreamRecords_ = other.changeStreamRecords_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureChangeStreamRecordsIsMutable(); + changeStreamRecords_.addAll(other.changeStreamRecords_); + } + onChanged(); + } + } else { + if (!other.changeStreamRecords_.isEmpty()) { + if (changeStreamRecordsBuilder_.isEmpty()) { + changeStreamRecordsBuilder_.dispose(); + changeStreamRecordsBuilder_ = null; + changeStreamRecords_ = other.changeStreamRecords_; + bitField0_ = (bitField0_ & ~0x00000200); + changeStreamRecordsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChangeStreamRecordsFieldBuilder() + : null; + } else { + changeStreamRecordsBuilder_.addAllMessages(other.changeStreamRecords_); + } + } + } + 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: + { + input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCommitTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getReadResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getQueryResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + transactionRestarted_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + batchTxnId_ = input.readBytes(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + com.google.spanner.executor.v1.BatchPartition m = + input.readMessage( + com.google.spanner.executor.v1.BatchPartition.parser(), extensionRegistry); + if (dbPartitionBuilder_ == null) { + ensureDbPartitionIsMutable(); + dbPartition_.add(m); + } else { + dbPartitionBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: + { + input.readMessage(getAdminResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + long v = input.readInt64(); + ensureDmlRowsModifiedIsMutable(); + dmlRowsModified_.addLong(v); + break; + } // case 72 + case 74: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureDmlRowsModifiedIsMutable(); + while (input.getBytesUntilLimit() > 0) { + dmlRowsModified_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 74 + case 82: + { + com.google.spanner.executor.v1.ChangeStreamRecord m = + input.readMessage( + com.google.spanner.executor.v1.ChangeStreamRecord.parser(), + extensionRegistry); + if (changeStreamRecordsBuilder_ == null) { + ensureChangeStreamRecordsIsMutable(); + changeStreamRecords_.add(m); + } else { + changeStreamRecordsBuilder_.addMessage(m); + } + break; + } // case 82 + 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.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + /** + * + * + *
+     * If an outcome is split into multiple parts, status will be set only in the
+     * last part.
+     * 
+ * + * optional .google.rpc.Status status = 1; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * If an outcome is split into multiple parts, status will be set only in the
+     * last part.
+     * 
+ * + * optional .google.rpc.Status status = 1; + * + * @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(); + } + } + /** + * + * + *
+     * If an outcome is split into multiple parts, status will be set only in the
+     * last part.
+     * 
+ * + * optional .google.rpc.Status status = 1; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + } else { + statusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * If an outcome is split into multiple parts, status will be set only in the
+     * last part.
+     * 
+ * + * optional .google.rpc.Status status = 1; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * If an outcome is split into multiple parts, status will be set only in the
+     * last part.
+     * 
+ * + * optional .google.rpc.Status status = 1; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && status_ != null + && status_ != com.google.rpc.Status.getDefaultInstance()) { + getStatusBuilder().mergeFrom(value); + } else { + status_ = value; + } + } else { + statusBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * If an outcome is split into multiple parts, status will be set only in the
+     * last part.
+     * 
+ * + * optional .google.rpc.Status status = 1; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * If an outcome is split into multiple parts, status will be set only in the
+     * last part.
+     * 
+ * + * optional .google.rpc.Status status = 1; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If an outcome is split into multiple parts, status will be set only in the
+     * last part.
+     * 
+ * + * optional .google.rpc.Status status = 1; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + * + * + *
+     * If an outcome is split into multiple parts, status will be set only in the
+     * last part.
+     * 
+ * + * optional .google.rpc.Status status = 1; + */ + 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 commitTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + commitTimeBuilder_; + /** + * + * + *
+     * Transaction timestamp. It must be set for successful committed actions.
+     * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + * + * @return Whether the commitTime field is set. + */ + public boolean hasCommitTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Transaction timestamp. It must be set for successful committed actions.
+     * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + * + * @return The commitTime. + */ + public com.google.protobuf.Timestamp getCommitTime() { + if (commitTimeBuilder_ == null) { + return commitTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitTime_; + } else { + return commitTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Transaction timestamp. It must be set for successful committed actions.
+     * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + */ + public Builder setCommitTime(com.google.protobuf.Timestamp value) { + if (commitTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commitTime_ = value; + } else { + commitTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Transaction timestamp. It must be set for successful committed actions.
+     * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + */ + public Builder setCommitTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (commitTimeBuilder_ == null) { + commitTime_ = builderForValue.build(); + } else { + commitTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Transaction timestamp. It must be set for successful committed actions.
+     * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + */ + public Builder mergeCommitTime(com.google.protobuf.Timestamp value) { + if (commitTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && commitTime_ != null + && commitTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCommitTimeBuilder().mergeFrom(value); + } else { + commitTime_ = value; + } + } else { + commitTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Transaction timestamp. It must be set for successful committed actions.
+     * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + */ + public Builder clearCommitTime() { + bitField0_ = (bitField0_ & ~0x00000002); + commitTime_ = null; + if (commitTimeBuilder_ != null) { + commitTimeBuilder_.dispose(); + commitTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Transaction timestamp. It must be set for successful committed actions.
+     * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getCommitTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCommitTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Transaction timestamp. It must be set for successful committed actions.
+     * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { + if (commitTimeBuilder_ != null) { + return commitTimeBuilder_.getMessageOrBuilder(); + } else { + return commitTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitTime_; + } + } + /** + * + * + *
+     * Transaction timestamp. It must be set for successful committed actions.
+     * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCommitTimeFieldBuilder() { + if (commitTimeBuilder_ == null) { + commitTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCommitTime(), getParentForChildren(), isClean()); + commitTime_ = null; + } + return commitTimeBuilder_; + } + + private com.google.spanner.executor.v1.ReadResult readResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ReadResult, + com.google.spanner.executor.v1.ReadResult.Builder, + com.google.spanner.executor.v1.ReadResultOrBuilder> + readResultBuilder_; + /** + * + * + *
+     * Result of a ReadAction. This field must be set for ReadActions even if
+     * no rows were read.
+     * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + * + * @return Whether the readResult field is set. + */ + public boolean hasReadResult() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Result of a ReadAction. This field must be set for ReadActions even if
+     * no rows were read.
+     * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + * + * @return The readResult. + */ + public com.google.spanner.executor.v1.ReadResult getReadResult() { + if (readResultBuilder_ == null) { + return readResult_ == null + ? com.google.spanner.executor.v1.ReadResult.getDefaultInstance() + : readResult_; + } else { + return readResultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Result of a ReadAction. This field must be set for ReadActions even if
+     * no rows were read.
+     * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + */ + public Builder setReadResult(com.google.spanner.executor.v1.ReadResult value) { + if (readResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readResult_ = value; + } else { + readResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Result of a ReadAction. This field must be set for ReadActions even if
+     * no rows were read.
+     * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + */ + public Builder setReadResult( + com.google.spanner.executor.v1.ReadResult.Builder builderForValue) { + if (readResultBuilder_ == null) { + readResult_ = builderForValue.build(); + } else { + readResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Result of a ReadAction. This field must be set for ReadActions even if
+     * no rows were read.
+     * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + */ + public Builder mergeReadResult(com.google.spanner.executor.v1.ReadResult value) { + if (readResultBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && readResult_ != null + && readResult_ != com.google.spanner.executor.v1.ReadResult.getDefaultInstance()) { + getReadResultBuilder().mergeFrom(value); + } else { + readResult_ = value; + } + } else { + readResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Result of a ReadAction. This field must be set for ReadActions even if
+     * no rows were read.
+     * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + */ + public Builder clearReadResult() { + bitField0_ = (bitField0_ & ~0x00000004); + readResult_ = null; + if (readResultBuilder_ != null) { + readResultBuilder_.dispose(); + readResultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Result of a ReadAction. This field must be set for ReadActions even if
+     * no rows were read.
+     * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + */ + public com.google.spanner.executor.v1.ReadResult.Builder getReadResultBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getReadResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Result of a ReadAction. This field must be set for ReadActions even if
+     * no rows were read.
+     * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + */ + public com.google.spanner.executor.v1.ReadResultOrBuilder getReadResultOrBuilder() { + if (readResultBuilder_ != null) { + return readResultBuilder_.getMessageOrBuilder(); + } else { + return readResult_ == null + ? com.google.spanner.executor.v1.ReadResult.getDefaultInstance() + : readResult_; + } + } + /** + * + * + *
+     * Result of a ReadAction. This field must be set for ReadActions even if
+     * no rows were read.
+     * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ReadResult, + com.google.spanner.executor.v1.ReadResult.Builder, + com.google.spanner.executor.v1.ReadResultOrBuilder> + getReadResultFieldBuilder() { + if (readResultBuilder_ == null) { + readResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ReadResult, + com.google.spanner.executor.v1.ReadResult.Builder, + com.google.spanner.executor.v1.ReadResultOrBuilder>( + getReadResult(), getParentForChildren(), isClean()); + readResult_ = null; + } + return readResultBuilder_; + } + + private com.google.spanner.executor.v1.QueryResult queryResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryResult, + com.google.spanner.executor.v1.QueryResult.Builder, + com.google.spanner.executor.v1.QueryResultOrBuilder> + queryResultBuilder_; + /** + * + * + *
+     * Result of a Query. This field must be set for Queries even if no rows were
+     * read.
+     * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + * + * @return Whether the queryResult field is set. + */ + public boolean hasQueryResult() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Result of a Query. This field must be set for Queries even if no rows were
+     * read.
+     * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + * + * @return The queryResult. + */ + public com.google.spanner.executor.v1.QueryResult getQueryResult() { + if (queryResultBuilder_ == null) { + return queryResult_ == null + ? com.google.spanner.executor.v1.QueryResult.getDefaultInstance() + : queryResult_; + } else { + return queryResultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Result of a Query. This field must be set for Queries even if no rows were
+     * read.
+     * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + */ + public Builder setQueryResult(com.google.spanner.executor.v1.QueryResult value) { + if (queryResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryResult_ = value; + } else { + queryResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Result of a Query. This field must be set for Queries even if no rows were
+     * read.
+     * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + */ + public Builder setQueryResult( + com.google.spanner.executor.v1.QueryResult.Builder builderForValue) { + if (queryResultBuilder_ == null) { + queryResult_ = builderForValue.build(); + } else { + queryResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Result of a Query. This field must be set for Queries even if no rows were
+     * read.
+     * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + */ + public Builder mergeQueryResult(com.google.spanner.executor.v1.QueryResult value) { + if (queryResultBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && queryResult_ != null + && queryResult_ != com.google.spanner.executor.v1.QueryResult.getDefaultInstance()) { + getQueryResultBuilder().mergeFrom(value); + } else { + queryResult_ = value; + } + } else { + queryResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Result of a Query. This field must be set for Queries even if no rows were
+     * read.
+     * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + */ + public Builder clearQueryResult() { + bitField0_ = (bitField0_ & ~0x00000008); + queryResult_ = null; + if (queryResultBuilder_ != null) { + queryResultBuilder_.dispose(); + queryResultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Result of a Query. This field must be set for Queries even if no rows were
+     * read.
+     * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + */ + public com.google.spanner.executor.v1.QueryResult.Builder getQueryResultBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getQueryResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Result of a Query. This field must be set for Queries even if no rows were
+     * read.
+     * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + */ + public com.google.spanner.executor.v1.QueryResultOrBuilder getQueryResultOrBuilder() { + if (queryResultBuilder_ != null) { + return queryResultBuilder_.getMessageOrBuilder(); + } else { + return queryResult_ == null + ? com.google.spanner.executor.v1.QueryResult.getDefaultInstance() + : queryResult_; + } + } + /** + * + * + *
+     * Result of a Query. This field must be set for Queries even if no rows were
+     * read.
+     * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryResult, + com.google.spanner.executor.v1.QueryResult.Builder, + com.google.spanner.executor.v1.QueryResultOrBuilder> + getQueryResultFieldBuilder() { + if (queryResultBuilder_ == null) { + queryResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.QueryResult, + com.google.spanner.executor.v1.QueryResult.Builder, + com.google.spanner.executor.v1.QueryResultOrBuilder>( + getQueryResult(), getParentForChildren(), isClean()); + queryResult_ = null; + } + return queryResultBuilder_; + } + + private boolean transactionRestarted_; + /** + * + * + *
+     * This bit indicates that Spanner has restarted the current transaction. It
+     * means that the client should replay all the reads and writes.
+     * Setting it to true is only valid in the context of a read-write
+     * transaction, as an outcome of a committing FinishTransactionAction.
+     * 
+ * + * optional bool transaction_restarted = 5; + * + * @return Whether the transactionRestarted field is set. + */ + @java.lang.Override + public boolean hasTransactionRestarted() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * This bit indicates that Spanner has restarted the current transaction. It
+     * means that the client should replay all the reads and writes.
+     * Setting it to true is only valid in the context of a read-write
+     * transaction, as an outcome of a committing FinishTransactionAction.
+     * 
+ * + * optional bool transaction_restarted = 5; + * + * @return The transactionRestarted. + */ + @java.lang.Override + public boolean getTransactionRestarted() { + return transactionRestarted_; + } + /** + * + * + *
+     * This bit indicates that Spanner has restarted the current transaction. It
+     * means that the client should replay all the reads and writes.
+     * Setting it to true is only valid in the context of a read-write
+     * transaction, as an outcome of a committing FinishTransactionAction.
+     * 
+ * + * optional bool transaction_restarted = 5; + * + * @param value The transactionRestarted to set. + * @return This builder for chaining. + */ + public Builder setTransactionRestarted(boolean value) { + + transactionRestarted_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * This bit indicates that Spanner has restarted the current transaction. It
+     * means that the client should replay all the reads and writes.
+     * Setting it to true is only valid in the context of a read-write
+     * transaction, as an outcome of a committing FinishTransactionAction.
+     * 
+ * + * optional bool transaction_restarted = 5; + * + * @return This builder for chaining. + */ + public Builder clearTransactionRestarted() { + bitField0_ = (bitField0_ & ~0x00000010); + transactionRestarted_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString batchTxnId_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * In successful StartBatchTransactionAction outcomes, this contains the ID of
+     * the transaction.
+     * 
+ * + * optional bytes batch_txn_id = 6; + * + * @return Whether the batchTxnId field is set. + */ + @java.lang.Override + public boolean hasBatchTxnId() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * In successful StartBatchTransactionAction outcomes, this contains the ID of
+     * the transaction.
+     * 
+ * + * optional bytes batch_txn_id = 6; + * + * @return The batchTxnId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBatchTxnId() { + return batchTxnId_; + } + /** + * + * + *
+     * In successful StartBatchTransactionAction outcomes, this contains the ID of
+     * the transaction.
+     * 
+ * + * optional bytes batch_txn_id = 6; + * + * @param value The batchTxnId to set. + * @return This builder for chaining. + */ + public Builder setBatchTxnId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + batchTxnId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * In successful StartBatchTransactionAction outcomes, this contains the ID of
+     * the transaction.
+     * 
+ * + * optional bytes batch_txn_id = 6; + * + * @return This builder for chaining. + */ + public Builder clearBatchTxnId() { + bitField0_ = (bitField0_ & ~0x00000020); + batchTxnId_ = getDefaultInstance().getBatchTxnId(); + onChanged(); + return this; + } + + private java.util.List dbPartition_ = + java.util.Collections.emptyList(); + + private void ensureDbPartitionIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + dbPartition_ = + new java.util.ArrayList(dbPartition_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.BatchPartition, + com.google.spanner.executor.v1.BatchPartition.Builder, + com.google.spanner.executor.v1.BatchPartitionOrBuilder> + dbPartitionBuilder_; + + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public java.util.List getDbPartitionList() { + if (dbPartitionBuilder_ == null) { + return java.util.Collections.unmodifiableList(dbPartition_); + } else { + return dbPartitionBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public int getDbPartitionCount() { + if (dbPartitionBuilder_ == null) { + return dbPartition_.size(); + } else { + return dbPartitionBuilder_.getCount(); + } + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public com.google.spanner.executor.v1.BatchPartition getDbPartition(int index) { + if (dbPartitionBuilder_ == null) { + return dbPartition_.get(index); + } else { + return dbPartitionBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public Builder setDbPartition(int index, com.google.spanner.executor.v1.BatchPartition value) { + if (dbPartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDbPartitionIsMutable(); + dbPartition_.set(index, value); + onChanged(); + } else { + dbPartitionBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public Builder setDbPartition( + int index, com.google.spanner.executor.v1.BatchPartition.Builder builderForValue) { + if (dbPartitionBuilder_ == null) { + ensureDbPartitionIsMutable(); + dbPartition_.set(index, builderForValue.build()); + onChanged(); + } else { + dbPartitionBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public Builder addDbPartition(com.google.spanner.executor.v1.BatchPartition value) { + if (dbPartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDbPartitionIsMutable(); + dbPartition_.add(value); + onChanged(); + } else { + dbPartitionBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public Builder addDbPartition(int index, com.google.spanner.executor.v1.BatchPartition value) { + if (dbPartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDbPartitionIsMutable(); + dbPartition_.add(index, value); + onChanged(); + } else { + dbPartitionBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public Builder addDbPartition( + com.google.spanner.executor.v1.BatchPartition.Builder builderForValue) { + if (dbPartitionBuilder_ == null) { + ensureDbPartitionIsMutable(); + dbPartition_.add(builderForValue.build()); + onChanged(); + } else { + dbPartitionBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public Builder addDbPartition( + int index, com.google.spanner.executor.v1.BatchPartition.Builder builderForValue) { + if (dbPartitionBuilder_ == null) { + ensureDbPartitionIsMutable(); + dbPartition_.add(index, builderForValue.build()); + onChanged(); + } else { + dbPartitionBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public Builder addAllDbPartition( + java.lang.Iterable values) { + if (dbPartitionBuilder_ == null) { + ensureDbPartitionIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dbPartition_); + onChanged(); + } else { + dbPartitionBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public Builder clearDbPartition() { + if (dbPartitionBuilder_ == null) { + dbPartition_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + dbPartitionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public Builder removeDbPartition(int index) { + if (dbPartitionBuilder_ == null) { + ensureDbPartitionIsMutable(); + dbPartition_.remove(index); + onChanged(); + } else { + dbPartitionBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public com.google.spanner.executor.v1.BatchPartition.Builder getDbPartitionBuilder(int index) { + return getDbPartitionFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public com.google.spanner.executor.v1.BatchPartitionOrBuilder getDbPartitionOrBuilder( + int index) { + if (dbPartitionBuilder_ == null) { + return dbPartition_.get(index); + } else { + return dbPartitionBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public java.util.List + getDbPartitionOrBuilderList() { + if (dbPartitionBuilder_ != null) { + return dbPartitionBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dbPartition_); + } + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public com.google.spanner.executor.v1.BatchPartition.Builder addDbPartitionBuilder() { + return getDbPartitionFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.BatchPartition.getDefaultInstance()); + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public com.google.spanner.executor.v1.BatchPartition.Builder addDbPartitionBuilder(int index) { + return getDbPartitionFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.BatchPartition.getDefaultInstance()); + } + /** + * + * + *
+     * Generated database partitions (result of a
+     * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+     * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + public java.util.List + getDbPartitionBuilderList() { + return getDbPartitionFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.BatchPartition, + com.google.spanner.executor.v1.BatchPartition.Builder, + com.google.spanner.executor.v1.BatchPartitionOrBuilder> + getDbPartitionFieldBuilder() { + if (dbPartitionBuilder_ == null) { + dbPartitionBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.BatchPartition, + com.google.spanner.executor.v1.BatchPartition.Builder, + com.google.spanner.executor.v1.BatchPartitionOrBuilder>( + dbPartition_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + dbPartition_ = null; + } + return dbPartitionBuilder_; + } + + private com.google.spanner.executor.v1.AdminResult adminResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.AdminResult, + com.google.spanner.executor.v1.AdminResult.Builder, + com.google.spanner.executor.v1.AdminResultOrBuilder> + adminResultBuilder_; + /** + * + * + *
+     * Result of admin related actions.
+     * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + * + * @return Whether the adminResult field is set. + */ + public boolean hasAdminResult() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Result of admin related actions.
+     * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + * + * @return The adminResult. + */ + public com.google.spanner.executor.v1.AdminResult getAdminResult() { + if (adminResultBuilder_ == null) { + return adminResult_ == null + ? com.google.spanner.executor.v1.AdminResult.getDefaultInstance() + : adminResult_; + } else { + return adminResultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Result of admin related actions.
+     * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + */ + public Builder setAdminResult(com.google.spanner.executor.v1.AdminResult value) { + if (adminResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + adminResult_ = value; + } else { + adminResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Result of admin related actions.
+     * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + */ + public Builder setAdminResult( + com.google.spanner.executor.v1.AdminResult.Builder builderForValue) { + if (adminResultBuilder_ == null) { + adminResult_ = builderForValue.build(); + } else { + adminResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Result of admin related actions.
+     * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + */ + public Builder mergeAdminResult(com.google.spanner.executor.v1.AdminResult value) { + if (adminResultBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && adminResult_ != null + && adminResult_ != com.google.spanner.executor.v1.AdminResult.getDefaultInstance()) { + getAdminResultBuilder().mergeFrom(value); + } else { + adminResult_ = value; + } + } else { + adminResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Result of admin related actions.
+     * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + */ + public Builder clearAdminResult() { + bitField0_ = (bitField0_ & ~0x00000080); + adminResult_ = null; + if (adminResultBuilder_ != null) { + adminResultBuilder_.dispose(); + adminResultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Result of admin related actions.
+     * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + */ + public com.google.spanner.executor.v1.AdminResult.Builder getAdminResultBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getAdminResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Result of admin related actions.
+     * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + */ + public com.google.spanner.executor.v1.AdminResultOrBuilder getAdminResultOrBuilder() { + if (adminResultBuilder_ != null) { + return adminResultBuilder_.getMessageOrBuilder(); + } else { + return adminResult_ == null + ? com.google.spanner.executor.v1.AdminResult.getDefaultInstance() + : adminResult_; + } + } + /** + * + * + *
+     * Result of admin related actions.
+     * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.AdminResult, + com.google.spanner.executor.v1.AdminResult.Builder, + com.google.spanner.executor.v1.AdminResultOrBuilder> + getAdminResultFieldBuilder() { + if (adminResultBuilder_ == null) { + adminResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.AdminResult, + com.google.spanner.executor.v1.AdminResult.Builder, + com.google.spanner.executor.v1.AdminResultOrBuilder>( + getAdminResult(), getParentForChildren(), isClean()); + adminResult_ = null; + } + return adminResultBuilder_; + } + + private com.google.protobuf.Internal.LongList dmlRowsModified_ = emptyLongList(); + + private void ensureDmlRowsModifiedIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + dmlRowsModified_ = mutableCopy(dmlRowsModified_); + bitField0_ |= 0x00000100; + } + } + /** + * + * + *
+     * Stores rows modified by query in single DML or batch DML action.
+     * In case of batch DML action, stores 0 as row count of errored DML query.
+     * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @return A list containing the dmlRowsModified. + */ + public java.util.List getDmlRowsModifiedList() { + return ((bitField0_ & 0x00000100) != 0) + ? java.util.Collections.unmodifiableList(dmlRowsModified_) + : dmlRowsModified_; + } + /** + * + * + *
+     * Stores rows modified by query in single DML or batch DML action.
+     * In case of batch DML action, stores 0 as row count of errored DML query.
+     * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @return The count of dmlRowsModified. + */ + public int getDmlRowsModifiedCount() { + return dmlRowsModified_.size(); + } + /** + * + * + *
+     * Stores rows modified by query in single DML or batch DML action.
+     * In case of batch DML action, stores 0 as row count of errored DML query.
+     * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @param index The index of the element to return. + * @return The dmlRowsModified at the given index. + */ + public long getDmlRowsModified(int index) { + return dmlRowsModified_.getLong(index); + } + /** + * + * + *
+     * Stores rows modified by query in single DML or batch DML action.
+     * In case of batch DML action, stores 0 as row count of errored DML query.
+     * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @param index The index to set the value at. + * @param value The dmlRowsModified to set. + * @return This builder for chaining. + */ + public Builder setDmlRowsModified(int index, long value) { + + ensureDmlRowsModifiedIsMutable(); + dmlRowsModified_.setLong(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Stores rows modified by query in single DML or batch DML action.
+     * In case of batch DML action, stores 0 as row count of errored DML query.
+     * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @param value The dmlRowsModified to add. + * @return This builder for chaining. + */ + public Builder addDmlRowsModified(long value) { + + ensureDmlRowsModifiedIsMutable(); + dmlRowsModified_.addLong(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Stores rows modified by query in single DML or batch DML action.
+     * In case of batch DML action, stores 0 as row count of errored DML query.
+     * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @param values The dmlRowsModified to add. + * @return This builder for chaining. + */ + public Builder addAllDmlRowsModified(java.lang.Iterable values) { + ensureDmlRowsModifiedIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dmlRowsModified_); + onChanged(); + return this; + } + /** + * + * + *
+     * Stores rows modified by query in single DML or batch DML action.
+     * In case of batch DML action, stores 0 as row count of errored DML query.
+     * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @return This builder for chaining. + */ + public Builder clearDmlRowsModified() { + dmlRowsModified_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + private java.util.List changeStreamRecords_ = + java.util.Collections.emptyList(); + + private void ensureChangeStreamRecordsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + changeStreamRecords_ = + new java.util.ArrayList( + changeStreamRecords_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ChangeStreamRecord, + com.google.spanner.executor.v1.ChangeStreamRecord.Builder, + com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder> + changeStreamRecordsBuilder_; + + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public java.util.List + getChangeStreamRecordsList() { + if (changeStreamRecordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(changeStreamRecords_); + } else { + return changeStreamRecordsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public int getChangeStreamRecordsCount() { + if (changeStreamRecordsBuilder_ == null) { + return changeStreamRecords_.size(); + } else { + return changeStreamRecordsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public com.google.spanner.executor.v1.ChangeStreamRecord getChangeStreamRecords(int index) { + if (changeStreamRecordsBuilder_ == null) { + return changeStreamRecords_.get(index); + } else { + return changeStreamRecordsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public Builder setChangeStreamRecords( + int index, com.google.spanner.executor.v1.ChangeStreamRecord value) { + if (changeStreamRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangeStreamRecordsIsMutable(); + changeStreamRecords_.set(index, value); + onChanged(); + } else { + changeStreamRecordsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public Builder setChangeStreamRecords( + int index, com.google.spanner.executor.v1.ChangeStreamRecord.Builder builderForValue) { + if (changeStreamRecordsBuilder_ == null) { + ensureChangeStreamRecordsIsMutable(); + changeStreamRecords_.set(index, builderForValue.build()); + onChanged(); + } else { + changeStreamRecordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public Builder addChangeStreamRecords(com.google.spanner.executor.v1.ChangeStreamRecord value) { + if (changeStreamRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangeStreamRecordsIsMutable(); + changeStreamRecords_.add(value); + onChanged(); + } else { + changeStreamRecordsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public Builder addChangeStreamRecords( + int index, com.google.spanner.executor.v1.ChangeStreamRecord value) { + if (changeStreamRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangeStreamRecordsIsMutable(); + changeStreamRecords_.add(index, value); + onChanged(); + } else { + changeStreamRecordsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public Builder addChangeStreamRecords( + com.google.spanner.executor.v1.ChangeStreamRecord.Builder builderForValue) { + if (changeStreamRecordsBuilder_ == null) { + ensureChangeStreamRecordsIsMutable(); + changeStreamRecords_.add(builderForValue.build()); + onChanged(); + } else { + changeStreamRecordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public Builder addChangeStreamRecords( + int index, com.google.spanner.executor.v1.ChangeStreamRecord.Builder builderForValue) { + if (changeStreamRecordsBuilder_ == null) { + ensureChangeStreamRecordsIsMutable(); + changeStreamRecords_.add(index, builderForValue.build()); + onChanged(); + } else { + changeStreamRecordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public Builder addAllChangeStreamRecords( + java.lang.Iterable values) { + if (changeStreamRecordsBuilder_ == null) { + ensureChangeStreamRecordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, changeStreamRecords_); + onChanged(); + } else { + changeStreamRecordsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public Builder clearChangeStreamRecords() { + if (changeStreamRecordsBuilder_ == null) { + changeStreamRecords_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + changeStreamRecordsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public Builder removeChangeStreamRecords(int index) { + if (changeStreamRecordsBuilder_ == null) { + ensureChangeStreamRecordsIsMutable(); + changeStreamRecords_.remove(index); + onChanged(); + } else { + changeStreamRecordsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public com.google.spanner.executor.v1.ChangeStreamRecord.Builder getChangeStreamRecordsBuilder( + int index) { + return getChangeStreamRecordsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder + getChangeStreamRecordsOrBuilder(int index) { + if (changeStreamRecordsBuilder_ == null) { + return changeStreamRecords_.get(index); + } else { + return changeStreamRecordsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public java.util.List + getChangeStreamRecordsOrBuilderList() { + if (changeStreamRecordsBuilder_ != null) { + return changeStreamRecordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(changeStreamRecords_); + } + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public com.google.spanner.executor.v1.ChangeStreamRecord.Builder + addChangeStreamRecordsBuilder() { + return getChangeStreamRecordsFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.ChangeStreamRecord.getDefaultInstance()); + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public com.google.spanner.executor.v1.ChangeStreamRecord.Builder addChangeStreamRecordsBuilder( + int index) { + return getChangeStreamRecordsFieldBuilder() + .addBuilder( + index, com.google.spanner.executor.v1.ChangeStreamRecord.getDefaultInstance()); + } + /** + * + * + *
+     * Change stream records returned by a change stream query.
+     * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + public java.util.List + getChangeStreamRecordsBuilderList() { + return getChangeStreamRecordsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ChangeStreamRecord, + com.google.spanner.executor.v1.ChangeStreamRecord.Builder, + com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder> + getChangeStreamRecordsFieldBuilder() { + if (changeStreamRecordsBuilder_ == null) { + changeStreamRecordsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ChangeStreamRecord, + com.google.spanner.executor.v1.ChangeStreamRecord.Builder, + com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder>( + changeStreamRecords_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + changeStreamRecords_ = null; + } + return changeStreamRecordsBuilder_; + } + + @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.executor.v1.SpannerActionOutcome) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.SpannerActionOutcome) + private static final com.google.spanner.executor.v1.SpannerActionOutcome DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.SpannerActionOutcome(); + } + + public static com.google.spanner.executor.v1.SpannerActionOutcome getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpannerActionOutcome 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.executor.v1.SpannerActionOutcome getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOutcomeOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOutcomeOrBuilder.java new file mode 100644 index 00000000000..9e226d5df82 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerActionOutcomeOrBuilder.java @@ -0,0 +1,423 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface SpannerActionOutcomeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.SpannerActionOutcome) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If an outcome is split into multiple parts, status will be set only in the
+   * last part.
+   * 
+ * + * optional .google.rpc.Status status = 1; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+   * If an outcome is split into multiple parts, status will be set only in the
+   * last part.
+   * 
+ * + * optional .google.rpc.Status status = 1; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+   * If an outcome is split into multiple parts, status will be set only in the
+   * last part.
+   * 
+ * + * optional .google.rpc.Status status = 1; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + + /** + * + * + *
+   * Transaction timestamp. It must be set for successful committed actions.
+   * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + * + * @return Whether the commitTime field is set. + */ + boolean hasCommitTime(); + /** + * + * + *
+   * Transaction timestamp. It must be set for successful committed actions.
+   * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + * + * @return The commitTime. + */ + com.google.protobuf.Timestamp getCommitTime(); + /** + * + * + *
+   * Transaction timestamp. It must be set for successful committed actions.
+   * 
+ * + * optional .google.protobuf.Timestamp commit_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder(); + + /** + * + * + *
+   * Result of a ReadAction. This field must be set for ReadActions even if
+   * no rows were read.
+   * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + * + * @return Whether the readResult field is set. + */ + boolean hasReadResult(); + /** + * + * + *
+   * Result of a ReadAction. This field must be set for ReadActions even if
+   * no rows were read.
+   * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + * + * @return The readResult. + */ + com.google.spanner.executor.v1.ReadResult getReadResult(); + /** + * + * + *
+   * Result of a ReadAction. This field must be set for ReadActions even if
+   * no rows were read.
+   * 
+ * + * optional .google.spanner.executor.v1.ReadResult read_result = 3; + */ + com.google.spanner.executor.v1.ReadResultOrBuilder getReadResultOrBuilder(); + + /** + * + * + *
+   * Result of a Query. This field must be set for Queries even if no rows were
+   * read.
+   * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + * + * @return Whether the queryResult field is set. + */ + boolean hasQueryResult(); + /** + * + * + *
+   * Result of a Query. This field must be set for Queries even if no rows were
+   * read.
+   * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + * + * @return The queryResult. + */ + com.google.spanner.executor.v1.QueryResult getQueryResult(); + /** + * + * + *
+   * Result of a Query. This field must be set for Queries even if no rows were
+   * read.
+   * 
+ * + * optional .google.spanner.executor.v1.QueryResult query_result = 4; + */ + com.google.spanner.executor.v1.QueryResultOrBuilder getQueryResultOrBuilder(); + + /** + * + * + *
+   * This bit indicates that Spanner has restarted the current transaction. It
+   * means that the client should replay all the reads and writes.
+   * Setting it to true is only valid in the context of a read-write
+   * transaction, as an outcome of a committing FinishTransactionAction.
+   * 
+ * + * optional bool transaction_restarted = 5; + * + * @return Whether the transactionRestarted field is set. + */ + boolean hasTransactionRestarted(); + /** + * + * + *
+   * This bit indicates that Spanner has restarted the current transaction. It
+   * means that the client should replay all the reads and writes.
+   * Setting it to true is only valid in the context of a read-write
+   * transaction, as an outcome of a committing FinishTransactionAction.
+   * 
+ * + * optional bool transaction_restarted = 5; + * + * @return The transactionRestarted. + */ + boolean getTransactionRestarted(); + + /** + * + * + *
+   * In successful StartBatchTransactionAction outcomes, this contains the ID of
+   * the transaction.
+   * 
+ * + * optional bytes batch_txn_id = 6; + * + * @return Whether the batchTxnId field is set. + */ + boolean hasBatchTxnId(); + /** + * + * + *
+   * In successful StartBatchTransactionAction outcomes, this contains the ID of
+   * the transaction.
+   * 
+ * + * optional bytes batch_txn_id = 6; + * + * @return The batchTxnId. + */ + com.google.protobuf.ByteString getBatchTxnId(); + + /** + * + * + *
+   * Generated database partitions (result of a
+   * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+   * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + java.util.List getDbPartitionList(); + /** + * + * + *
+   * Generated database partitions (result of a
+   * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+   * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + com.google.spanner.executor.v1.BatchPartition getDbPartition(int index); + /** + * + * + *
+   * Generated database partitions (result of a
+   * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+   * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + int getDbPartitionCount(); + /** + * + * + *
+   * Generated database partitions (result of a
+   * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+   * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + java.util.List + getDbPartitionOrBuilderList(); + /** + * + * + *
+   * Generated database partitions (result of a
+   * GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
+   * 
+ * + * repeated .google.spanner.executor.v1.BatchPartition db_partition = 7; + */ + com.google.spanner.executor.v1.BatchPartitionOrBuilder getDbPartitionOrBuilder(int index); + + /** + * + * + *
+   * Result of admin related actions.
+   * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + * + * @return Whether the adminResult field is set. + */ + boolean hasAdminResult(); + /** + * + * + *
+   * Result of admin related actions.
+   * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + * + * @return The adminResult. + */ + com.google.spanner.executor.v1.AdminResult getAdminResult(); + /** + * + * + *
+   * Result of admin related actions.
+   * 
+ * + * optional .google.spanner.executor.v1.AdminResult admin_result = 8; + */ + com.google.spanner.executor.v1.AdminResultOrBuilder getAdminResultOrBuilder(); + + /** + * + * + *
+   * Stores rows modified by query in single DML or batch DML action.
+   * In case of batch DML action, stores 0 as row count of errored DML query.
+   * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @return A list containing the dmlRowsModified. + */ + java.util.List getDmlRowsModifiedList(); + /** + * + * + *
+   * Stores rows modified by query in single DML or batch DML action.
+   * In case of batch DML action, stores 0 as row count of errored DML query.
+   * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @return The count of dmlRowsModified. + */ + int getDmlRowsModifiedCount(); + /** + * + * + *
+   * Stores rows modified by query in single DML or batch DML action.
+   * In case of batch DML action, stores 0 as row count of errored DML query.
+   * 
+ * + * repeated int64 dml_rows_modified = 9; + * + * @param index The index of the element to return. + * @return The dmlRowsModified at the given index. + */ + long getDmlRowsModified(int index); + + /** + * + * + *
+   * Change stream records returned by a change stream query.
+   * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + java.util.List getChangeStreamRecordsList(); + /** + * + * + *
+   * Change stream records returned by a change stream query.
+   * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + com.google.spanner.executor.v1.ChangeStreamRecord getChangeStreamRecords(int index); + /** + * + * + *
+   * Change stream records returned by a change stream query.
+   * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + int getChangeStreamRecordsCount(); + /** + * + * + *
+   * Change stream records returned by a change stream query.
+   * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + java.util.List + getChangeStreamRecordsOrBuilderList(); + /** + * + * + *
+   * Change stream records returned by a change stream query.
+   * 
+ * + * repeated .google.spanner.executor.v1.ChangeStreamRecord change_stream_records = 10; + * + */ + com.google.spanner.executor.v1.ChangeStreamRecordOrBuilder getChangeStreamRecordsOrBuilder( + int index); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAsyncActionRequest.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAsyncActionRequest.java new file mode 100644 index 00000000000..82b3b635ac7 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAsyncActionRequest.java @@ -0,0 +1,799 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Request to executor service that start a new Spanner action.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.SpannerAsyncActionRequest} + */ +public final class SpannerAsyncActionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.SpannerAsyncActionRequest) + SpannerAsyncActionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpannerAsyncActionRequest.newBuilder() to construct. + private SpannerAsyncActionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpannerAsyncActionRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpannerAsyncActionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.SpannerAsyncActionRequest.class, + com.google.spanner.executor.v1.SpannerAsyncActionRequest.Builder.class); + } + + public static final int ACTION_ID_FIELD_NUMBER = 1; + private int actionId_ = 0; + /** + * + * + *
+   * Action id to uniquely identify this action request.
+   * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + @java.lang.Override + public int getActionId() { + return actionId_; + } + + public static final int ACTION_FIELD_NUMBER = 2; + private com.google.spanner.executor.v1.SpannerAction action_; + /** + * + * + *
+   * The actual SpannerAction to perform.
+   * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + * + * @return Whether the action field is set. + */ + @java.lang.Override + public boolean hasAction() { + return action_ != null; + } + /** + * + * + *
+   * The actual SpannerAction to perform.
+   * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + * + * @return The action. + */ + @java.lang.Override + public com.google.spanner.executor.v1.SpannerAction getAction() { + return action_ == null + ? com.google.spanner.executor.v1.SpannerAction.getDefaultInstance() + : action_; + } + /** + * + * + *
+   * The actual SpannerAction to perform.
+   * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.SpannerActionOrBuilder getActionOrBuilder() { + return action_ == null + ? com.google.spanner.executor.v1.SpannerAction.getDefaultInstance() + : action_; + } + + 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 (actionId_ != 0) { + output.writeInt32(1, actionId_); + } + if (action_ != null) { + output.writeMessage(2, getAction()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (actionId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, actionId_); + } + if (action_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAction()); + } + 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.executor.v1.SpannerAsyncActionRequest)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.SpannerAsyncActionRequest other = + (com.google.spanner.executor.v1.SpannerAsyncActionRequest) obj; + + if (getActionId() != other.getActionId()) return false; + if (hasAction() != other.hasAction()) return false; + if (hasAction()) { + if (!getAction().equals(other.getAction())) 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) + ACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getActionId(); + if (hasAction()) { + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionRequest 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.executor.v1.SpannerAsyncActionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionRequest 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.executor.v1.SpannerAsyncActionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionRequest 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.executor.v1.SpannerAsyncActionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionRequest 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.executor.v1.SpannerAsyncActionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionRequest 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.executor.v1.SpannerAsyncActionRequest 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; + } + /** + * + * + *
+   * Request to executor service that start a new Spanner action.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.SpannerAsyncActionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.SpannerAsyncActionRequest) + com.google.spanner.executor.v1.SpannerAsyncActionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.SpannerAsyncActionRequest.class, + com.google.spanner.executor.v1.SpannerAsyncActionRequest.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.SpannerAsyncActionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + actionId_ = 0; + action_ = null; + if (actionBuilder_ != null) { + actionBuilder_.dispose(); + actionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAsyncActionRequest_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerAsyncActionRequest getDefaultInstanceForType() { + return com.google.spanner.executor.v1.SpannerAsyncActionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerAsyncActionRequest build() { + com.google.spanner.executor.v1.SpannerAsyncActionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerAsyncActionRequest buildPartial() { + com.google.spanner.executor.v1.SpannerAsyncActionRequest result = + new com.google.spanner.executor.v1.SpannerAsyncActionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.SpannerAsyncActionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.actionId_ = actionId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.action_ = actionBuilder_ == null ? action_ : actionBuilder_.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.executor.v1.SpannerAsyncActionRequest) { + return mergeFrom((com.google.spanner.executor.v1.SpannerAsyncActionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.SpannerAsyncActionRequest other) { + if (other == com.google.spanner.executor.v1.SpannerAsyncActionRequest.getDefaultInstance()) + return this; + if (other.getActionId() != 0) { + setActionId(other.getActionId()); + } + if (other.hasAction()) { + mergeAction(other.getAction()); + } + 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: + { + actionId_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 int actionId_; + /** + * + * + *
+     * Action id to uniquely identify this action request.
+     * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + @java.lang.Override + public int getActionId() { + return actionId_; + } + /** + * + * + *
+     * Action id to uniquely identify this action request.
+     * 
+ * + * int32 action_id = 1; + * + * @param value The actionId to set. + * @return This builder for chaining. + */ + public Builder setActionId(int value) { + + actionId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Action id to uniquely identify this action request.
+     * 
+ * + * int32 action_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearActionId() { + bitField0_ = (bitField0_ & ~0x00000001); + actionId_ = 0; + onChanged(); + return this; + } + + private com.google.spanner.executor.v1.SpannerAction action_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.SpannerAction, + com.google.spanner.executor.v1.SpannerAction.Builder, + com.google.spanner.executor.v1.SpannerActionOrBuilder> + actionBuilder_; + /** + * + * + *
+     * The actual SpannerAction to perform.
+     * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + * + * @return Whether the action field is set. + */ + public boolean hasAction() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The actual SpannerAction to perform.
+     * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + * + * @return The action. + */ + public com.google.spanner.executor.v1.SpannerAction getAction() { + if (actionBuilder_ == null) { + return action_ == null + ? com.google.spanner.executor.v1.SpannerAction.getDefaultInstance() + : action_; + } else { + return actionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The actual SpannerAction to perform.
+     * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + */ + public Builder setAction(com.google.spanner.executor.v1.SpannerAction value) { + if (actionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + } else { + actionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The actual SpannerAction to perform.
+     * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + */ + public Builder setAction(com.google.spanner.executor.v1.SpannerAction.Builder builderForValue) { + if (actionBuilder_ == null) { + action_ = builderForValue.build(); + } else { + actionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The actual SpannerAction to perform.
+     * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + */ + public Builder mergeAction(com.google.spanner.executor.v1.SpannerAction value) { + if (actionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && action_ != null + && action_ != com.google.spanner.executor.v1.SpannerAction.getDefaultInstance()) { + getActionBuilder().mergeFrom(value); + } else { + action_ = value; + } + } else { + actionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The actual SpannerAction to perform.
+     * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000002); + action_ = null; + if (actionBuilder_ != null) { + actionBuilder_.dispose(); + actionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The actual SpannerAction to perform.
+     * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + */ + public com.google.spanner.executor.v1.SpannerAction.Builder getActionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getActionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The actual SpannerAction to perform.
+     * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + */ + public com.google.spanner.executor.v1.SpannerActionOrBuilder getActionOrBuilder() { + if (actionBuilder_ != null) { + return actionBuilder_.getMessageOrBuilder(); + } else { + return action_ == null + ? com.google.spanner.executor.v1.SpannerAction.getDefaultInstance() + : action_; + } + } + /** + * + * + *
+     * The actual SpannerAction to perform.
+     * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.SpannerAction, + com.google.spanner.executor.v1.SpannerAction.Builder, + com.google.spanner.executor.v1.SpannerActionOrBuilder> + getActionFieldBuilder() { + if (actionBuilder_ == null) { + actionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.SpannerAction, + com.google.spanner.executor.v1.SpannerAction.Builder, + com.google.spanner.executor.v1.SpannerActionOrBuilder>( + getAction(), getParentForChildren(), isClean()); + action_ = null; + } + return actionBuilder_; + } + + @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.executor.v1.SpannerAsyncActionRequest) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.SpannerAsyncActionRequest) + private static final com.google.spanner.executor.v1.SpannerAsyncActionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.SpannerAsyncActionRequest(); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpannerAsyncActionRequest 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.executor.v1.SpannerAsyncActionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAsyncActionRequestOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAsyncActionRequestOrBuilder.java new file mode 100644 index 00000000000..7b43292bb5e --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAsyncActionRequestOrBuilder.java @@ -0,0 +1,73 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface SpannerAsyncActionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.SpannerAsyncActionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Action id to uniquely identify this action request.
+   * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + int getActionId(); + + /** + * + * + *
+   * The actual SpannerAction to perform.
+   * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + * + * @return Whether the action field is set. + */ + boolean hasAction(); + /** + * + * + *
+   * The actual SpannerAction to perform.
+   * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + * + * @return The action. + */ + com.google.spanner.executor.v1.SpannerAction getAction(); + /** + * + * + *
+   * The actual SpannerAction to perform.
+   * 
+ * + * .google.spanner.executor.v1.SpannerAction action = 2; + */ + com.google.spanner.executor.v1.SpannerActionOrBuilder getActionOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAsyncActionResponse.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAsyncActionResponse.java new file mode 100644 index 00000000000..b085cbe14ad --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAsyncActionResponse.java @@ -0,0 +1,813 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Response from executor service.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.SpannerAsyncActionResponse} + */ +public final class SpannerAsyncActionResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.SpannerAsyncActionResponse) + SpannerAsyncActionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpannerAsyncActionResponse.newBuilder() to construct. + private SpannerAsyncActionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpannerAsyncActionResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpannerAsyncActionResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.SpannerAsyncActionResponse.class, + com.google.spanner.executor.v1.SpannerAsyncActionResponse.Builder.class); + } + + public static final int ACTION_ID_FIELD_NUMBER = 1; + private int actionId_ = 0; + /** + * + * + *
+   * Action id corresponds to the request.
+   * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + @java.lang.Override + public int getActionId() { + return actionId_; + } + + public static final int OUTCOME_FIELD_NUMBER = 2; + private com.google.spanner.executor.v1.SpannerActionOutcome outcome_; + /** + * + * + *
+   * If action results are split into multiple responses, only the last response
+   * can and should contain status.
+   * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + * + * @return Whether the outcome field is set. + */ + @java.lang.Override + public boolean hasOutcome() { + return outcome_ != null; + } + /** + * + * + *
+   * If action results are split into multiple responses, only the last response
+   * can and should contain status.
+   * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + * + * @return The outcome. + */ + @java.lang.Override + public com.google.spanner.executor.v1.SpannerActionOutcome getOutcome() { + return outcome_ == null + ? com.google.spanner.executor.v1.SpannerActionOutcome.getDefaultInstance() + : outcome_; + } + /** + * + * + *
+   * If action results are split into multiple responses, only the last response
+   * can and should contain status.
+   * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder getOutcomeOrBuilder() { + return outcome_ == null + ? com.google.spanner.executor.v1.SpannerActionOutcome.getDefaultInstance() + : outcome_; + } + + 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 (actionId_ != 0) { + output.writeInt32(1, actionId_); + } + if (outcome_ != null) { + output.writeMessage(2, getOutcome()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (actionId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, actionId_); + } + if (outcome_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOutcome()); + } + 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.executor.v1.SpannerAsyncActionResponse)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.SpannerAsyncActionResponse other = + (com.google.spanner.executor.v1.SpannerAsyncActionResponse) obj; + + if (getActionId() != other.getActionId()) return false; + if (hasOutcome() != other.hasOutcome()) return false; + if (hasOutcome()) { + if (!getOutcome().equals(other.getOutcome())) 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) + ACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getActionId(); + if (hasOutcome()) { + hash = (37 * hash) + OUTCOME_FIELD_NUMBER; + hash = (53 * hash) + getOutcome().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionResponse 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.executor.v1.SpannerAsyncActionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionResponse 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.executor.v1.SpannerAsyncActionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionResponse 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.executor.v1.SpannerAsyncActionResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionResponse 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.executor.v1.SpannerAsyncActionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionResponse 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.executor.v1.SpannerAsyncActionResponse 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; + } + /** + * + * + *
+   * Response from executor service.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.SpannerAsyncActionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.SpannerAsyncActionResponse) + com.google.spanner.executor.v1.SpannerAsyncActionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.SpannerAsyncActionResponse.class, + com.google.spanner.executor.v1.SpannerAsyncActionResponse.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.SpannerAsyncActionResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + actionId_ = 0; + outcome_ = null; + if (outcomeBuilder_ != null) { + outcomeBuilder_.dispose(); + outcomeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_SpannerAsyncActionResponse_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerAsyncActionResponse getDefaultInstanceForType() { + return com.google.spanner.executor.v1.SpannerAsyncActionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerAsyncActionResponse build() { + com.google.spanner.executor.v1.SpannerAsyncActionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.SpannerAsyncActionResponse buildPartial() { + com.google.spanner.executor.v1.SpannerAsyncActionResponse result = + new com.google.spanner.executor.v1.SpannerAsyncActionResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.SpannerAsyncActionResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.actionId_ = actionId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.outcome_ = outcomeBuilder_ == null ? outcome_ : outcomeBuilder_.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.executor.v1.SpannerAsyncActionResponse) { + return mergeFrom((com.google.spanner.executor.v1.SpannerAsyncActionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.SpannerAsyncActionResponse other) { + if (other == com.google.spanner.executor.v1.SpannerAsyncActionResponse.getDefaultInstance()) + return this; + if (other.getActionId() != 0) { + setActionId(other.getActionId()); + } + if (other.hasOutcome()) { + mergeOutcome(other.getOutcome()); + } + 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: + { + actionId_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getOutcomeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 int actionId_; + /** + * + * + *
+     * Action id corresponds to the request.
+     * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + @java.lang.Override + public int getActionId() { + return actionId_; + } + /** + * + * + *
+     * Action id corresponds to the request.
+     * 
+ * + * int32 action_id = 1; + * + * @param value The actionId to set. + * @return This builder for chaining. + */ + public Builder setActionId(int value) { + + actionId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Action id corresponds to the request.
+     * 
+ * + * int32 action_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearActionId() { + bitField0_ = (bitField0_ & ~0x00000001); + actionId_ = 0; + onChanged(); + return this; + } + + private com.google.spanner.executor.v1.SpannerActionOutcome outcome_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.SpannerActionOutcome, + com.google.spanner.executor.v1.SpannerActionOutcome.Builder, + com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder> + outcomeBuilder_; + /** + * + * + *
+     * If action results are split into multiple responses, only the last response
+     * can and should contain status.
+     * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + * + * @return Whether the outcome field is set. + */ + public boolean hasOutcome() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * If action results are split into multiple responses, only the last response
+     * can and should contain status.
+     * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + * + * @return The outcome. + */ + public com.google.spanner.executor.v1.SpannerActionOutcome getOutcome() { + if (outcomeBuilder_ == null) { + return outcome_ == null + ? com.google.spanner.executor.v1.SpannerActionOutcome.getDefaultInstance() + : outcome_; + } else { + return outcomeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * If action results are split into multiple responses, only the last response
+     * can and should contain status.
+     * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + */ + public Builder setOutcome(com.google.spanner.executor.v1.SpannerActionOutcome value) { + if (outcomeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outcome_ = value; + } else { + outcomeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * If action results are split into multiple responses, only the last response
+     * can and should contain status.
+     * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + */ + public Builder setOutcome( + com.google.spanner.executor.v1.SpannerActionOutcome.Builder builderForValue) { + if (outcomeBuilder_ == null) { + outcome_ = builderForValue.build(); + } else { + outcomeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * If action results are split into multiple responses, only the last response
+     * can and should contain status.
+     * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + */ + public Builder mergeOutcome(com.google.spanner.executor.v1.SpannerActionOutcome value) { + if (outcomeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && outcome_ != null + && outcome_ + != com.google.spanner.executor.v1.SpannerActionOutcome.getDefaultInstance()) { + getOutcomeBuilder().mergeFrom(value); + } else { + outcome_ = value; + } + } else { + outcomeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * If action results are split into multiple responses, only the last response
+     * can and should contain status.
+     * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + */ + public Builder clearOutcome() { + bitField0_ = (bitField0_ & ~0x00000002); + outcome_ = null; + if (outcomeBuilder_ != null) { + outcomeBuilder_.dispose(); + outcomeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * If action results are split into multiple responses, only the last response
+     * can and should contain status.
+     * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + */ + public com.google.spanner.executor.v1.SpannerActionOutcome.Builder getOutcomeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOutcomeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If action results are split into multiple responses, only the last response
+     * can and should contain status.
+     * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + */ + public com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder getOutcomeOrBuilder() { + if (outcomeBuilder_ != null) { + return outcomeBuilder_.getMessageOrBuilder(); + } else { + return outcome_ == null + ? com.google.spanner.executor.v1.SpannerActionOutcome.getDefaultInstance() + : outcome_; + } + } + /** + * + * + *
+     * If action results are split into multiple responses, only the last response
+     * can and should contain status.
+     * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.SpannerActionOutcome, + com.google.spanner.executor.v1.SpannerActionOutcome.Builder, + com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder> + getOutcomeFieldBuilder() { + if (outcomeBuilder_ == null) { + outcomeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.SpannerActionOutcome, + com.google.spanner.executor.v1.SpannerActionOutcome.Builder, + com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder>( + getOutcome(), getParentForChildren(), isClean()); + outcome_ = null; + } + return outcomeBuilder_; + } + + @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.executor.v1.SpannerAsyncActionResponse) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.SpannerAsyncActionResponse) + private static final com.google.spanner.executor.v1.SpannerAsyncActionResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.SpannerAsyncActionResponse(); + } + + public static com.google.spanner.executor.v1.SpannerAsyncActionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpannerAsyncActionResponse 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.executor.v1.SpannerAsyncActionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAsyncActionResponseOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAsyncActionResponseOrBuilder.java new file mode 100644 index 00000000000..4cd40921dc2 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/SpannerAsyncActionResponseOrBuilder.java @@ -0,0 +1,76 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface SpannerAsyncActionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.SpannerAsyncActionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Action id corresponds to the request.
+   * 
+ * + * int32 action_id = 1; + * + * @return The actionId. + */ + int getActionId(); + + /** + * + * + *
+   * If action results are split into multiple responses, only the last response
+   * can and should contain status.
+   * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + * + * @return Whether the outcome field is set. + */ + boolean hasOutcome(); + /** + * + * + *
+   * If action results are split into multiple responses, only the last response
+   * can and should contain status.
+   * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + * + * @return The outcome. + */ + com.google.spanner.executor.v1.SpannerActionOutcome getOutcome(); + /** + * + * + *
+   * If action results are split into multiple responses, only the last response
+   * can and should contain status.
+   * 
+ * + * .google.spanner.executor.v1.SpannerActionOutcome outcome = 2; + */ + com.google.spanner.executor.v1.SpannerActionOutcomeOrBuilder getOutcomeOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/StartBatchTransactionAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/StartBatchTransactionAction.java new file mode 100644 index 00000000000..8151ddd2d1a --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/StartBatchTransactionAction.java @@ -0,0 +1,1220 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Starts a batch read-only transaction in executor. Successful outcomes of this
+ * action will contain batch_txn_id--the identificator that can be used to start
+ * the same transaction in other Executors to parallelize partition processing.
+ *
+ * Example of a batch read flow:
+ * 1. Start batch transaction with a timestamp (StartBatchTransactionAction)
+ * 2. Generate database partitions for a read or query
+ * (GenerateDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction)
+ * 3. Call ExecutePartitionAction for some or all partitions, process rows
+ * 4. Clean up the transaction (CloseBatchTransactionAction).
+ *
+ * More sophisticated example, with parallel processing:
+ * 1. Start batch transaction with a timestamp (StartBatchTransactionAction),
+ * note the returned BatchTransactionId
+ * 2. Generate database partitions for a read or query
+ * (GenerateDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction)
+ * 3. Distribute the partitions over a pool of workers, along with the
+ * transaction ID.
+ *
+ * In each worker:
+ * 4-1. StartBatchTransactionAction with the given transaction ID
+ * 4-2. ExecutePartitionAction for each partition it got, process read results
+ * 4-3. Close (not cleanup) the transaction (CloseBatchTransactionAction).
+ *
+ * When all workers are done:
+ * 5. Cleanup the transaction (CloseBatchTransactionAction). This can be done
+ * either by the last worker to finish the job, or by the main Executor that
+ * initialized this transaction in the first place. It is also possible to clean
+ * it up with a brand new Executor -- just execute StartBatchTransactionAction
+ * with the ID, then clean it up right away.
+ *
+ * Cleaning up is optional, but recommended.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.StartBatchTransactionAction} + */ +public final class StartBatchTransactionAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.StartBatchTransactionAction) + StartBatchTransactionActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartBatchTransactionAction.newBuilder() to construct. + private StartBatchTransactionAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartBatchTransactionAction() { + cloudDatabaseRole_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartBatchTransactionAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_StartBatchTransactionAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_StartBatchTransactionAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.StartBatchTransactionAction.class, + com.google.spanner.executor.v1.StartBatchTransactionAction.Builder.class); + } + + private int paramCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object param_; + + public enum ParamCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BATCH_TXN_TIME(1), + TID(2), + PARAM_NOT_SET(0); + private final int value; + + private ParamCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ParamCase valueOf(int value) { + return forNumber(value); + } + + public static ParamCase forNumber(int value) { + switch (value) { + case 1: + return BATCH_TXN_TIME; + case 2: + return TID; + case 0: + return PARAM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ParamCase getParamCase() { + return ParamCase.forNumber(paramCase_); + } + + public static final int BATCH_TXN_TIME_FIELD_NUMBER = 1; + /** + * + * + *
+   * The exact timestamp to start the batch transaction.
+   * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + * + * @return Whether the batchTxnTime field is set. + */ + @java.lang.Override + public boolean hasBatchTxnTime() { + return paramCase_ == 1; + } + /** + * + * + *
+   * The exact timestamp to start the batch transaction.
+   * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + * + * @return The batchTxnTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBatchTxnTime() { + if (paramCase_ == 1) { + return (com.google.protobuf.Timestamp) param_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + * + * + *
+   * The exact timestamp to start the batch transaction.
+   * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBatchTxnTimeOrBuilder() { + if (paramCase_ == 1) { + return (com.google.protobuf.Timestamp) param_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int TID_FIELD_NUMBER = 2; + /** + * + * + *
+   * ID of a batch read-only transaction. It can be used to start the same
+   * batch transaction on multiple executors and parallelize partition
+   * processing.
+   * 
+ * + * bytes tid = 2; + * + * @return Whether the tid field is set. + */ + @java.lang.Override + public boolean hasTid() { + return paramCase_ == 2; + } + /** + * + * + *
+   * ID of a batch read-only transaction. It can be used to start the same
+   * batch transaction on multiple executors and parallelize partition
+   * processing.
+   * 
+ * + * bytes tid = 2; + * + * @return The tid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTid() { + if (paramCase_ == 2) { + return (com.google.protobuf.ByteString) param_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int CLOUD_DATABASE_ROLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object cloudDatabaseRole_ = ""; + /** + * + * + *
+   * Database role to assume while performing this action. Setting the
+   * database_role will enforce additional role-based access checks on this
+   * action.
+   * 
+ * + * string cloud_database_role = 3; + * + * @return The cloudDatabaseRole. + */ + @java.lang.Override + public java.lang.String getCloudDatabaseRole() { + java.lang.Object ref = cloudDatabaseRole_; + 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(); + cloudDatabaseRole_ = s; + return s; + } + } + /** + * + * + *
+   * Database role to assume while performing this action. Setting the
+   * database_role will enforce additional role-based access checks on this
+   * action.
+   * 
+ * + * string cloud_database_role = 3; + * + * @return The bytes for cloudDatabaseRole. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudDatabaseRoleBytes() { + java.lang.Object ref = cloudDatabaseRole_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudDatabaseRole_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (paramCase_ == 1) { + output.writeMessage(1, (com.google.protobuf.Timestamp) param_); + } + if (paramCase_ == 2) { + output.writeBytes(2, (com.google.protobuf.ByteString) param_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cloudDatabaseRole_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, cloudDatabaseRole_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (paramCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.protobuf.Timestamp) param_); + } + if (paramCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 2, (com.google.protobuf.ByteString) param_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cloudDatabaseRole_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, cloudDatabaseRole_); + } + 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.executor.v1.StartBatchTransactionAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.StartBatchTransactionAction other = + (com.google.spanner.executor.v1.StartBatchTransactionAction) obj; + + if (!getCloudDatabaseRole().equals(other.getCloudDatabaseRole())) return false; + if (!getParamCase().equals(other.getParamCase())) return false; + switch (paramCase_) { + case 1: + if (!getBatchTxnTime().equals(other.getBatchTxnTime())) return false; + break; + case 2: + if (!getTid().equals(other.getTid())) return false; + break; + case 0: + default: + } + 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) + CLOUD_DATABASE_ROLE_FIELD_NUMBER; + hash = (53 * hash) + getCloudDatabaseRole().hashCode(); + switch (paramCase_) { + case 1: + hash = (37 * hash) + BATCH_TXN_TIME_FIELD_NUMBER; + hash = (53 * hash) + getBatchTxnTime().hashCode(); + break; + case 2: + hash = (37 * hash) + TID_FIELD_NUMBER; + hash = (53 * hash) + getTid().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.StartBatchTransactionAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.StartBatchTransactionAction 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.executor.v1.StartBatchTransactionAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.StartBatchTransactionAction 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.executor.v1.StartBatchTransactionAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.StartBatchTransactionAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.StartBatchTransactionAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.StartBatchTransactionAction 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.executor.v1.StartBatchTransactionAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.StartBatchTransactionAction 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.executor.v1.StartBatchTransactionAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.StartBatchTransactionAction 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.executor.v1.StartBatchTransactionAction 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; + } + /** + * + * + *
+   * Starts a batch read-only transaction in executor. Successful outcomes of this
+   * action will contain batch_txn_id--the identificator that can be used to start
+   * the same transaction in other Executors to parallelize partition processing.
+   *
+   * Example of a batch read flow:
+   * 1. Start batch transaction with a timestamp (StartBatchTransactionAction)
+   * 2. Generate database partitions for a read or query
+   * (GenerateDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction)
+   * 3. Call ExecutePartitionAction for some or all partitions, process rows
+   * 4. Clean up the transaction (CloseBatchTransactionAction).
+   *
+   * More sophisticated example, with parallel processing:
+   * 1. Start batch transaction with a timestamp (StartBatchTransactionAction),
+   * note the returned BatchTransactionId
+   * 2. Generate database partitions for a read or query
+   * (GenerateDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction)
+   * 3. Distribute the partitions over a pool of workers, along with the
+   * transaction ID.
+   *
+   * In each worker:
+   * 4-1. StartBatchTransactionAction with the given transaction ID
+   * 4-2. ExecutePartitionAction for each partition it got, process read results
+   * 4-3. Close (not cleanup) the transaction (CloseBatchTransactionAction).
+   *
+   * When all workers are done:
+   * 5. Cleanup the transaction (CloseBatchTransactionAction). This can be done
+   * either by the last worker to finish the job, or by the main Executor that
+   * initialized this transaction in the first place. It is also possible to clean
+   * it up with a brand new Executor -- just execute StartBatchTransactionAction
+   * with the ID, then clean it up right away.
+   *
+   * Cleaning up is optional, but recommended.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.StartBatchTransactionAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.StartBatchTransactionAction) + com.google.spanner.executor.v1.StartBatchTransactionActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_StartBatchTransactionAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_StartBatchTransactionAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.StartBatchTransactionAction.class, + com.google.spanner.executor.v1.StartBatchTransactionAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.StartBatchTransactionAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (batchTxnTimeBuilder_ != null) { + batchTxnTimeBuilder_.clear(); + } + cloudDatabaseRole_ = ""; + paramCase_ = 0; + param_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_StartBatchTransactionAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.StartBatchTransactionAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.StartBatchTransactionAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.StartBatchTransactionAction build() { + com.google.spanner.executor.v1.StartBatchTransactionAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.StartBatchTransactionAction buildPartial() { + com.google.spanner.executor.v1.StartBatchTransactionAction result = + new com.google.spanner.executor.v1.StartBatchTransactionAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.StartBatchTransactionAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cloudDatabaseRole_ = cloudDatabaseRole_; + } + } + + private void buildPartialOneofs( + com.google.spanner.executor.v1.StartBatchTransactionAction result) { + result.paramCase_ = paramCase_; + result.param_ = this.param_; + if (paramCase_ == 1 && batchTxnTimeBuilder_ != null) { + result.param_ = batchTxnTimeBuilder_.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.executor.v1.StartBatchTransactionAction) { + return mergeFrom((com.google.spanner.executor.v1.StartBatchTransactionAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.StartBatchTransactionAction other) { + if (other == com.google.spanner.executor.v1.StartBatchTransactionAction.getDefaultInstance()) + return this; + if (!other.getCloudDatabaseRole().isEmpty()) { + cloudDatabaseRole_ = other.cloudDatabaseRole_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getParamCase()) { + case BATCH_TXN_TIME: + { + mergeBatchTxnTime(other.getBatchTxnTime()); + break; + } + case TID: + { + setTid(other.getTid()); + break; + } + case PARAM_NOT_SET: + { + break; + } + } + 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: + { + input.readMessage(getBatchTxnTimeFieldBuilder().getBuilder(), extensionRegistry); + paramCase_ = 1; + break; + } // case 10 + case 18: + { + param_ = input.readBytes(); + paramCase_ = 2; + break; + } // case 18 + case 26: + { + cloudDatabaseRole_ = input.readStringRequireUtf8(); + 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 paramCase_ = 0; + private java.lang.Object param_; + + public ParamCase getParamCase() { + return ParamCase.forNumber(paramCase_); + } + + public Builder clearParam() { + paramCase_ = 0; + param_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + batchTxnTimeBuilder_; + /** + * + * + *
+     * The exact timestamp to start the batch transaction.
+     * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + * + * @return Whether the batchTxnTime field is set. + */ + @java.lang.Override + public boolean hasBatchTxnTime() { + return paramCase_ == 1; + } + /** + * + * + *
+     * The exact timestamp to start the batch transaction.
+     * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + * + * @return The batchTxnTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getBatchTxnTime() { + if (batchTxnTimeBuilder_ == null) { + if (paramCase_ == 1) { + return (com.google.protobuf.Timestamp) param_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (paramCase_ == 1) { + return batchTxnTimeBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * The exact timestamp to start the batch transaction.
+     * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + */ + public Builder setBatchTxnTime(com.google.protobuf.Timestamp value) { + if (batchTxnTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + param_ = value; + onChanged(); + } else { + batchTxnTimeBuilder_.setMessage(value); + } + paramCase_ = 1; + return this; + } + /** + * + * + *
+     * The exact timestamp to start the batch transaction.
+     * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + */ + public Builder setBatchTxnTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (batchTxnTimeBuilder_ == null) { + param_ = builderForValue.build(); + onChanged(); + } else { + batchTxnTimeBuilder_.setMessage(builderForValue.build()); + } + paramCase_ = 1; + return this; + } + /** + * + * + *
+     * The exact timestamp to start the batch transaction.
+     * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + */ + public Builder mergeBatchTxnTime(com.google.protobuf.Timestamp value) { + if (batchTxnTimeBuilder_ == null) { + if (paramCase_ == 1 && param_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + param_ = + com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) param_) + .mergeFrom(value) + .buildPartial(); + } else { + param_ = value; + } + onChanged(); + } else { + if (paramCase_ == 1) { + batchTxnTimeBuilder_.mergeFrom(value); + } else { + batchTxnTimeBuilder_.setMessage(value); + } + } + paramCase_ = 1; + return this; + } + /** + * + * + *
+     * The exact timestamp to start the batch transaction.
+     * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + */ + public Builder clearBatchTxnTime() { + if (batchTxnTimeBuilder_ == null) { + if (paramCase_ == 1) { + paramCase_ = 0; + param_ = null; + onChanged(); + } + } else { + if (paramCase_ == 1) { + paramCase_ = 0; + param_ = null; + } + batchTxnTimeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The exact timestamp to start the batch transaction.
+     * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getBatchTxnTimeBuilder() { + return getBatchTxnTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The exact timestamp to start the batch transaction.
+     * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getBatchTxnTimeOrBuilder() { + if ((paramCase_ == 1) && (batchTxnTimeBuilder_ != null)) { + return batchTxnTimeBuilder_.getMessageOrBuilder(); + } else { + if (paramCase_ == 1) { + return (com.google.protobuf.Timestamp) param_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * The exact timestamp to start the batch transaction.
+     * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getBatchTxnTimeFieldBuilder() { + if (batchTxnTimeBuilder_ == null) { + if (!(paramCase_ == 1)) { + param_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + batchTxnTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) param_, getParentForChildren(), isClean()); + param_ = null; + } + paramCase_ = 1; + onChanged(); + return batchTxnTimeBuilder_; + } + + /** + * + * + *
+     * ID of a batch read-only transaction. It can be used to start the same
+     * batch transaction on multiple executors and parallelize partition
+     * processing.
+     * 
+ * + * bytes tid = 2; + * + * @return Whether the tid field is set. + */ + public boolean hasTid() { + return paramCase_ == 2; + } + /** + * + * + *
+     * ID of a batch read-only transaction. It can be used to start the same
+     * batch transaction on multiple executors and parallelize partition
+     * processing.
+     * 
+ * + * bytes tid = 2; + * + * @return The tid. + */ + public com.google.protobuf.ByteString getTid() { + if (paramCase_ == 2) { + return (com.google.protobuf.ByteString) param_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+     * ID of a batch read-only transaction. It can be used to start the same
+     * batch transaction on multiple executors and parallelize partition
+     * processing.
+     * 
+ * + * bytes tid = 2; + * + * @param value The tid to set. + * @return This builder for chaining. + */ + public Builder setTid(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + paramCase_ = 2; + param_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * ID of a batch read-only transaction. It can be used to start the same
+     * batch transaction on multiple executors and parallelize partition
+     * processing.
+     * 
+ * + * bytes tid = 2; + * + * @return This builder for chaining. + */ + public Builder clearTid() { + if (paramCase_ == 2) { + paramCase_ = 0; + param_ = null; + onChanged(); + } + return this; + } + + private java.lang.Object cloudDatabaseRole_ = ""; + /** + * + * + *
+     * Database role to assume while performing this action. Setting the
+     * database_role will enforce additional role-based access checks on this
+     * action.
+     * 
+ * + * string cloud_database_role = 3; + * + * @return The cloudDatabaseRole. + */ + public java.lang.String getCloudDatabaseRole() { + java.lang.Object ref = cloudDatabaseRole_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudDatabaseRole_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Database role to assume while performing this action. Setting the
+     * database_role will enforce additional role-based access checks on this
+     * action.
+     * 
+ * + * string cloud_database_role = 3; + * + * @return The bytes for cloudDatabaseRole. + */ + public com.google.protobuf.ByteString getCloudDatabaseRoleBytes() { + java.lang.Object ref = cloudDatabaseRole_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudDatabaseRole_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Database role to assume while performing this action. Setting the
+     * database_role will enforce additional role-based access checks on this
+     * action.
+     * 
+ * + * string cloud_database_role = 3; + * + * @param value The cloudDatabaseRole to set. + * @return This builder for chaining. + */ + public Builder setCloudDatabaseRole(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cloudDatabaseRole_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Database role to assume while performing this action. Setting the
+     * database_role will enforce additional role-based access checks on this
+     * action.
+     * 
+ * + * string cloud_database_role = 3; + * + * @return This builder for chaining. + */ + public Builder clearCloudDatabaseRole() { + cloudDatabaseRole_ = getDefaultInstance().getCloudDatabaseRole(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Database role to assume while performing this action. Setting the
+     * database_role will enforce additional role-based access checks on this
+     * action.
+     * 
+ * + * string cloud_database_role = 3; + * + * @param value The bytes for cloudDatabaseRole to set. + * @return This builder for chaining. + */ + public Builder setCloudDatabaseRoleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cloudDatabaseRole_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.StartBatchTransactionAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.StartBatchTransactionAction) + private static final com.google.spanner.executor.v1.StartBatchTransactionAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.StartBatchTransactionAction(); + } + + public static com.google.spanner.executor.v1.StartBatchTransactionAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartBatchTransactionAction 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.executor.v1.StartBatchTransactionAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/StartBatchTransactionActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/StartBatchTransactionActionOrBuilder.java new file mode 100644 index 00000000000..36a9b82e176 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/StartBatchTransactionActionOrBuilder.java @@ -0,0 +1,120 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface StartBatchTransactionActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.StartBatchTransactionAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The exact timestamp to start the batch transaction.
+   * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + * + * @return Whether the batchTxnTime field is set. + */ + boolean hasBatchTxnTime(); + /** + * + * + *
+   * The exact timestamp to start the batch transaction.
+   * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + * + * @return The batchTxnTime. + */ + com.google.protobuf.Timestamp getBatchTxnTime(); + /** + * + * + *
+   * The exact timestamp to start the batch transaction.
+   * 
+ * + * .google.protobuf.Timestamp batch_txn_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getBatchTxnTimeOrBuilder(); + + /** + * + * + *
+   * ID of a batch read-only transaction. It can be used to start the same
+   * batch transaction on multiple executors and parallelize partition
+   * processing.
+   * 
+ * + * bytes tid = 2; + * + * @return Whether the tid field is set. + */ + boolean hasTid(); + /** + * + * + *
+   * ID of a batch read-only transaction. It can be used to start the same
+   * batch transaction on multiple executors and parallelize partition
+   * processing.
+   * 
+ * + * bytes tid = 2; + * + * @return The tid. + */ + com.google.protobuf.ByteString getTid(); + + /** + * + * + *
+   * Database role to assume while performing this action. Setting the
+   * database_role will enforce additional role-based access checks on this
+   * action.
+   * 
+ * + * string cloud_database_role = 3; + * + * @return The cloudDatabaseRole. + */ + java.lang.String getCloudDatabaseRole(); + /** + * + * + *
+   * Database role to assume while performing this action. Setting the
+   * database_role will enforce additional role-based access checks on this
+   * action.
+   * 
+ * + * string cloud_database_role = 3; + * + * @return The bytes for cloudDatabaseRole. + */ + com.google.protobuf.ByteString getCloudDatabaseRoleBytes(); + + com.google.spanner.executor.v1.StartBatchTransactionAction.ParamCase getParamCase(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/StartTransactionAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/StartTransactionAction.java new file mode 100644 index 00000000000..5a59ea38137 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/StartTransactionAction.java @@ -0,0 +1,1728 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * StartTransactionAction defines an action of initializing a transaction.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.StartTransactionAction} + */ +public final class StartTransactionAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.StartTransactionAction) + StartTransactionActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartTransactionAction.newBuilder() to construct. + private StartTransactionAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartTransactionAction() { + table_ = java.util.Collections.emptyList(); + transactionSeed_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartTransactionAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_StartTransactionAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_StartTransactionAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.StartTransactionAction.class, + com.google.spanner.executor.v1.StartTransactionAction.Builder.class); + } + + private int bitField0_; + public static final int CONCURRENCY_FIELD_NUMBER = 1; + private com.google.spanner.executor.v1.Concurrency concurrency_; + /** + * + * + *
+   * Concurrency is for read-only transactions and must be omitted for
+   * read-write transactions.
+   * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + * + * @return Whether the concurrency field is set. + */ + @java.lang.Override + public boolean hasConcurrency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Concurrency is for read-only transactions and must be omitted for
+   * read-write transactions.
+   * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + * + * @return The concurrency. + */ + @java.lang.Override + public com.google.spanner.executor.v1.Concurrency getConcurrency() { + return concurrency_ == null + ? com.google.spanner.executor.v1.Concurrency.getDefaultInstance() + : concurrency_; + } + /** + * + * + *
+   * Concurrency is for read-only transactions and must be omitted for
+   * read-write transactions.
+   * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ConcurrencyOrBuilder getConcurrencyOrBuilder() { + return concurrency_ == null + ? com.google.spanner.executor.v1.Concurrency.getDefaultInstance() + : concurrency_; + } + + public static final int TABLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List table_; + /** + * + * + *
+   * Metadata about tables and columns that will be involved in this
+   * transaction. It is to convert values of key parts correctly.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + @java.lang.Override + public java.util.List getTableList() { + return table_; + } + /** + * + * + *
+   * Metadata about tables and columns that will be involved in this
+   * transaction. It is to convert values of key parts correctly.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + @java.lang.Override + public java.util.List + getTableOrBuilderList() { + return table_; + } + /** + * + * + *
+   * Metadata about tables and columns that will be involved in this
+   * transaction. It is to convert values of key parts correctly.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + @java.lang.Override + public int getTableCount() { + return table_.size(); + } + /** + * + * + *
+   * Metadata about tables and columns that will be involved in this
+   * transaction. It is to convert values of key parts correctly.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.TableMetadata getTable(int index) { + return table_.get(index); + } + /** + * + * + *
+   * Metadata about tables and columns that will be involved in this
+   * transaction. It is to convert values of key parts correctly.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.TableMetadataOrBuilder getTableOrBuilder(int index) { + return table_.get(index); + } + + public static final int TRANSACTION_SEED_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object transactionSeed_ = ""; + /** + * + * + *
+   * Transaction_seed contains workid and op pair for this transaction, used for
+   * testing.
+   * 
+ * + * string transaction_seed = 3; + * + * @return The transactionSeed. + */ + @java.lang.Override + public java.lang.String getTransactionSeed() { + java.lang.Object ref = transactionSeed_; + 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(); + transactionSeed_ = s; + return s; + } + } + /** + * + * + *
+   * Transaction_seed contains workid and op pair for this transaction, used for
+   * testing.
+   * 
+ * + * string transaction_seed = 3; + * + * @return The bytes for transactionSeed. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTransactionSeedBytes() { + java.lang.Object ref = transactionSeed_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transactionSeed_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTION_OPTIONS_FIELD_NUMBER = 4; + private com.google.spanner.executor.v1.TransactionExecutionOptions executionOptions_; + /** + * + * + *
+   * Execution options (e.g., whether transaction is opaque, optimistic).
+   * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + * + * @return Whether the executionOptions field is set. + */ + @java.lang.Override + public boolean hasExecutionOptions() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Execution options (e.g., whether transaction is opaque, optimistic).
+   * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + * + * @return The executionOptions. + */ + @java.lang.Override + public com.google.spanner.executor.v1.TransactionExecutionOptions getExecutionOptions() { + return executionOptions_ == null + ? com.google.spanner.executor.v1.TransactionExecutionOptions.getDefaultInstance() + : executionOptions_; + } + /** + * + * + *
+   * Execution options (e.g., whether transaction is opaque, optimistic).
+   * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + */ + @java.lang.Override + public com.google.spanner.executor.v1.TransactionExecutionOptionsOrBuilder + getExecutionOptionsOrBuilder() { + return executionOptions_ == null + ? com.google.spanner.executor.v1.TransactionExecutionOptions.getDefaultInstance() + : executionOptions_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getConcurrency()); + } + for (int i = 0; i < table_.size(); i++) { + output.writeMessage(2, table_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionSeed_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, transactionSeed_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getExecutionOptions()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getConcurrency()); + } + for (int i = 0; i < table_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, table_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionSeed_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, transactionSeed_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExecutionOptions()); + } + 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.executor.v1.StartTransactionAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.StartTransactionAction other = + (com.google.spanner.executor.v1.StartTransactionAction) obj; + + if (hasConcurrency() != other.hasConcurrency()) return false; + if (hasConcurrency()) { + if (!getConcurrency().equals(other.getConcurrency())) return false; + } + if (!getTableList().equals(other.getTableList())) return false; + if (!getTransactionSeed().equals(other.getTransactionSeed())) return false; + if (hasExecutionOptions() != other.hasExecutionOptions()) return false; + if (hasExecutionOptions()) { + if (!getExecutionOptions().equals(other.getExecutionOptions())) 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 (hasConcurrency()) { + hash = (37 * hash) + CONCURRENCY_FIELD_NUMBER; + hash = (53 * hash) + getConcurrency().hashCode(); + } + if (getTableCount() > 0) { + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTableList().hashCode(); + } + hash = (37 * hash) + TRANSACTION_SEED_FIELD_NUMBER; + hash = (53 * hash) + getTransactionSeed().hashCode(); + if (hasExecutionOptions()) { + hash = (37 * hash) + EXECUTION_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getExecutionOptions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.StartTransactionAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.StartTransactionAction 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.executor.v1.StartTransactionAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.StartTransactionAction 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.executor.v1.StartTransactionAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.StartTransactionAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.StartTransactionAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.StartTransactionAction 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.executor.v1.StartTransactionAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.StartTransactionAction 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.executor.v1.StartTransactionAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.StartTransactionAction 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.executor.v1.StartTransactionAction 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; + } + /** + * + * + *
+   * StartTransactionAction defines an action of initializing a transaction.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.StartTransactionAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.StartTransactionAction) + com.google.spanner.executor.v1.StartTransactionActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_StartTransactionAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_StartTransactionAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.StartTransactionAction.class, + com.google.spanner.executor.v1.StartTransactionAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.StartTransactionAction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConcurrencyFieldBuilder(); + getTableFieldBuilder(); + getExecutionOptionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + concurrency_ = null; + if (concurrencyBuilder_ != null) { + concurrencyBuilder_.dispose(); + concurrencyBuilder_ = null; + } + if (tableBuilder_ == null) { + table_ = java.util.Collections.emptyList(); + } else { + table_ = null; + tableBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + transactionSeed_ = ""; + executionOptions_ = null; + if (executionOptionsBuilder_ != null) { + executionOptionsBuilder_.dispose(); + executionOptionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_StartTransactionAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.StartTransactionAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.StartTransactionAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.StartTransactionAction build() { + com.google.spanner.executor.v1.StartTransactionAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.StartTransactionAction buildPartial() { + com.google.spanner.executor.v1.StartTransactionAction result = + new com.google.spanner.executor.v1.StartTransactionAction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.executor.v1.StartTransactionAction result) { + if (tableBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + table_ = java.util.Collections.unmodifiableList(table_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.table_ = table_; + } else { + result.table_ = tableBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.StartTransactionAction result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.concurrency_ = + concurrencyBuilder_ == null ? concurrency_ : concurrencyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.transactionSeed_ = transactionSeed_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.executionOptions_ = + executionOptionsBuilder_ == null ? executionOptions_ : executionOptionsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_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.executor.v1.StartTransactionAction) { + return mergeFrom((com.google.spanner.executor.v1.StartTransactionAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.StartTransactionAction other) { + if (other == com.google.spanner.executor.v1.StartTransactionAction.getDefaultInstance()) + return this; + if (other.hasConcurrency()) { + mergeConcurrency(other.getConcurrency()); + } + if (tableBuilder_ == null) { + if (!other.table_.isEmpty()) { + if (table_.isEmpty()) { + table_ = other.table_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTableIsMutable(); + table_.addAll(other.table_); + } + onChanged(); + } + } else { + if (!other.table_.isEmpty()) { + if (tableBuilder_.isEmpty()) { + tableBuilder_.dispose(); + tableBuilder_ = null; + table_ = other.table_; + bitField0_ = (bitField0_ & ~0x00000002); + tableBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTableFieldBuilder() + : null; + } else { + tableBuilder_.addAllMessages(other.table_); + } + } + } + if (!other.getTransactionSeed().isEmpty()) { + transactionSeed_ = other.transactionSeed_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasExecutionOptions()) { + mergeExecutionOptions(other.getExecutionOptions()); + } + 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: + { + input.readMessage(getConcurrencyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.spanner.executor.v1.TableMetadata m = + input.readMessage( + com.google.spanner.executor.v1.TableMetadata.parser(), extensionRegistry); + if (tableBuilder_ == null) { + ensureTableIsMutable(); + table_.add(m); + } else { + tableBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + transactionSeed_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getExecutionOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + 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 com.google.spanner.executor.v1.Concurrency concurrency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.Concurrency, + com.google.spanner.executor.v1.Concurrency.Builder, + com.google.spanner.executor.v1.ConcurrencyOrBuilder> + concurrencyBuilder_; + /** + * + * + *
+     * Concurrency is for read-only transactions and must be omitted for
+     * read-write transactions.
+     * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + * + * @return Whether the concurrency field is set. + */ + public boolean hasConcurrency() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Concurrency is for read-only transactions and must be omitted for
+     * read-write transactions.
+     * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + * + * @return The concurrency. + */ + public com.google.spanner.executor.v1.Concurrency getConcurrency() { + if (concurrencyBuilder_ == null) { + return concurrency_ == null + ? com.google.spanner.executor.v1.Concurrency.getDefaultInstance() + : concurrency_; + } else { + return concurrencyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Concurrency is for read-only transactions and must be omitted for
+     * read-write transactions.
+     * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + */ + public Builder setConcurrency(com.google.spanner.executor.v1.Concurrency value) { + if (concurrencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + concurrency_ = value; + } else { + concurrencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Concurrency is for read-only transactions and must be omitted for
+     * read-write transactions.
+     * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + */ + public Builder setConcurrency( + com.google.spanner.executor.v1.Concurrency.Builder builderForValue) { + if (concurrencyBuilder_ == null) { + concurrency_ = builderForValue.build(); + } else { + concurrencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Concurrency is for read-only transactions and must be omitted for
+     * read-write transactions.
+     * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + */ + public Builder mergeConcurrency(com.google.spanner.executor.v1.Concurrency value) { + if (concurrencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && concurrency_ != null + && concurrency_ != com.google.spanner.executor.v1.Concurrency.getDefaultInstance()) { + getConcurrencyBuilder().mergeFrom(value); + } else { + concurrency_ = value; + } + } else { + concurrencyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Concurrency is for read-only transactions and must be omitted for
+     * read-write transactions.
+     * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + */ + public Builder clearConcurrency() { + bitField0_ = (bitField0_ & ~0x00000001); + concurrency_ = null; + if (concurrencyBuilder_ != null) { + concurrencyBuilder_.dispose(); + concurrencyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Concurrency is for read-only transactions and must be omitted for
+     * read-write transactions.
+     * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + */ + public com.google.spanner.executor.v1.Concurrency.Builder getConcurrencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConcurrencyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Concurrency is for read-only transactions and must be omitted for
+     * read-write transactions.
+     * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + */ + public com.google.spanner.executor.v1.ConcurrencyOrBuilder getConcurrencyOrBuilder() { + if (concurrencyBuilder_ != null) { + return concurrencyBuilder_.getMessageOrBuilder(); + } else { + return concurrency_ == null + ? com.google.spanner.executor.v1.Concurrency.getDefaultInstance() + : concurrency_; + } + } + /** + * + * + *
+     * Concurrency is for read-only transactions and must be omitted for
+     * read-write transactions.
+     * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.Concurrency, + com.google.spanner.executor.v1.Concurrency.Builder, + com.google.spanner.executor.v1.ConcurrencyOrBuilder> + getConcurrencyFieldBuilder() { + if (concurrencyBuilder_ == null) { + concurrencyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.Concurrency, + com.google.spanner.executor.v1.Concurrency.Builder, + com.google.spanner.executor.v1.ConcurrencyOrBuilder>( + getConcurrency(), getParentForChildren(), isClean()); + concurrency_ = null; + } + return concurrencyBuilder_; + } + + private java.util.List table_ = + java.util.Collections.emptyList(); + + private void ensureTableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + table_ = new java.util.ArrayList(table_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.TableMetadata, + com.google.spanner.executor.v1.TableMetadata.Builder, + com.google.spanner.executor.v1.TableMetadataOrBuilder> + tableBuilder_; + + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public java.util.List getTableList() { + if (tableBuilder_ == null) { + return java.util.Collections.unmodifiableList(table_); + } else { + return tableBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public int getTableCount() { + if (tableBuilder_ == null) { + return table_.size(); + } else { + return tableBuilder_.getCount(); + } + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public com.google.spanner.executor.v1.TableMetadata getTable(int index) { + if (tableBuilder_ == null) { + return table_.get(index); + } else { + return tableBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder setTable(int index, com.google.spanner.executor.v1.TableMetadata value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableIsMutable(); + table_.set(index, value); + onChanged(); + } else { + tableBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder setTable( + int index, com.google.spanner.executor.v1.TableMetadata.Builder builderForValue) { + if (tableBuilder_ == null) { + ensureTableIsMutable(); + table_.set(index, builderForValue.build()); + onChanged(); + } else { + tableBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder addTable(com.google.spanner.executor.v1.TableMetadata value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableIsMutable(); + table_.add(value); + onChanged(); + } else { + tableBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder addTable(int index, com.google.spanner.executor.v1.TableMetadata value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableIsMutable(); + table_.add(index, value); + onChanged(); + } else { + tableBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder addTable(com.google.spanner.executor.v1.TableMetadata.Builder builderForValue) { + if (tableBuilder_ == null) { + ensureTableIsMutable(); + table_.add(builderForValue.build()); + onChanged(); + } else { + tableBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder addTable( + int index, com.google.spanner.executor.v1.TableMetadata.Builder builderForValue) { + if (tableBuilder_ == null) { + ensureTableIsMutable(); + table_.add(index, builderForValue.build()); + onChanged(); + } else { + tableBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder addAllTable( + java.lang.Iterable values) { + if (tableBuilder_ == null) { + ensureTableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, table_); + onChanged(); + } else { + tableBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder clearTable() { + if (tableBuilder_ == null) { + table_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + tableBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public Builder removeTable(int index) { + if (tableBuilder_ == null) { + ensureTableIsMutable(); + table_.remove(index); + onChanged(); + } else { + tableBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public com.google.spanner.executor.v1.TableMetadata.Builder getTableBuilder(int index) { + return getTableFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public com.google.spanner.executor.v1.TableMetadataOrBuilder getTableOrBuilder(int index) { + if (tableBuilder_ == null) { + return table_.get(index); + } else { + return tableBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public java.util.List + getTableOrBuilderList() { + if (tableBuilder_ != null) { + return tableBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(table_); + } + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public com.google.spanner.executor.v1.TableMetadata.Builder addTableBuilder() { + return getTableFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.TableMetadata.getDefaultInstance()); + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public com.google.spanner.executor.v1.TableMetadata.Builder addTableBuilder(int index) { + return getTableFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.TableMetadata.getDefaultInstance()); + } + /** + * + * + *
+     * Metadata about tables and columns that will be involved in this
+     * transaction. It is to convert values of key parts correctly.
+     * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + public java.util.List + getTableBuilderList() { + return getTableFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.TableMetadata, + com.google.spanner.executor.v1.TableMetadata.Builder, + com.google.spanner.executor.v1.TableMetadataOrBuilder> + getTableFieldBuilder() { + if (tableBuilder_ == null) { + tableBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.TableMetadata, + com.google.spanner.executor.v1.TableMetadata.Builder, + com.google.spanner.executor.v1.TableMetadataOrBuilder>( + table_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + table_ = null; + } + return tableBuilder_; + } + + private java.lang.Object transactionSeed_ = ""; + /** + * + * + *
+     * Transaction_seed contains workid and op pair for this transaction, used for
+     * testing.
+     * 
+ * + * string transaction_seed = 3; + * + * @return The transactionSeed. + */ + public java.lang.String getTransactionSeed() { + java.lang.Object ref = transactionSeed_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionSeed_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Transaction_seed contains workid and op pair for this transaction, used for
+     * testing.
+     * 
+ * + * string transaction_seed = 3; + * + * @return The bytes for transactionSeed. + */ + public com.google.protobuf.ByteString getTransactionSeedBytes() { + java.lang.Object ref = transactionSeed_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transactionSeed_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Transaction_seed contains workid and op pair for this transaction, used for
+     * testing.
+     * 
+ * + * string transaction_seed = 3; + * + * @param value The transactionSeed to set. + * @return This builder for chaining. + */ + public Builder setTransactionSeed(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + transactionSeed_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Transaction_seed contains workid and op pair for this transaction, used for
+     * testing.
+     * 
+ * + * string transaction_seed = 3; + * + * @return This builder for chaining. + */ + public Builder clearTransactionSeed() { + transactionSeed_ = getDefaultInstance().getTransactionSeed(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Transaction_seed contains workid and op pair for this transaction, used for
+     * testing.
+     * 
+ * + * string transaction_seed = 3; + * + * @param value The bytes for transactionSeed to set. + * @return This builder for chaining. + */ + public Builder setTransactionSeedBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + transactionSeed_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.spanner.executor.v1.TransactionExecutionOptions executionOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.TransactionExecutionOptions, + com.google.spanner.executor.v1.TransactionExecutionOptions.Builder, + com.google.spanner.executor.v1.TransactionExecutionOptionsOrBuilder> + executionOptionsBuilder_; + /** + * + * + *
+     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + * + * @return Whether the executionOptions field is set. + */ + public boolean hasExecutionOptions() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + * + * @return The executionOptions. + */ + public com.google.spanner.executor.v1.TransactionExecutionOptions getExecutionOptions() { + if (executionOptionsBuilder_ == null) { + return executionOptions_ == null + ? com.google.spanner.executor.v1.TransactionExecutionOptions.getDefaultInstance() + : executionOptions_; + } else { + return executionOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + */ + public Builder setExecutionOptions( + com.google.spanner.executor.v1.TransactionExecutionOptions value) { + if (executionOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionOptions_ = value; + } else { + executionOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + */ + public Builder setExecutionOptions( + com.google.spanner.executor.v1.TransactionExecutionOptions.Builder builderForValue) { + if (executionOptionsBuilder_ == null) { + executionOptions_ = builderForValue.build(); + } else { + executionOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + */ + public Builder mergeExecutionOptions( + com.google.spanner.executor.v1.TransactionExecutionOptions value) { + if (executionOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && executionOptions_ != null + && executionOptions_ + != com.google.spanner.executor.v1.TransactionExecutionOptions + .getDefaultInstance()) { + getExecutionOptionsBuilder().mergeFrom(value); + } else { + executionOptions_ = value; + } + } else { + executionOptionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + */ + public Builder clearExecutionOptions() { + bitField0_ = (bitField0_ & ~0x00000008); + executionOptions_ = null; + if (executionOptionsBuilder_ != null) { + executionOptionsBuilder_.dispose(); + executionOptionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + */ + public com.google.spanner.executor.v1.TransactionExecutionOptions.Builder + getExecutionOptionsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getExecutionOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + */ + public com.google.spanner.executor.v1.TransactionExecutionOptionsOrBuilder + getExecutionOptionsOrBuilder() { + if (executionOptionsBuilder_ != null) { + return executionOptionsBuilder_.getMessageOrBuilder(); + } else { + return executionOptions_ == null + ? com.google.spanner.executor.v1.TransactionExecutionOptions.getDefaultInstance() + : executionOptions_; + } + } + /** + * + * + *
+     * Execution options (e.g., whether transaction is opaque, optimistic).
+     * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.TransactionExecutionOptions, + com.google.spanner.executor.v1.TransactionExecutionOptions.Builder, + com.google.spanner.executor.v1.TransactionExecutionOptionsOrBuilder> + getExecutionOptionsFieldBuilder() { + if (executionOptionsBuilder_ == null) { + executionOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.TransactionExecutionOptions, + com.google.spanner.executor.v1.TransactionExecutionOptions.Builder, + com.google.spanner.executor.v1.TransactionExecutionOptionsOrBuilder>( + getExecutionOptions(), getParentForChildren(), isClean()); + executionOptions_ = null; + } + return executionOptionsBuilder_; + } + + @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.executor.v1.StartTransactionAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.StartTransactionAction) + private static final com.google.spanner.executor.v1.StartTransactionAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.StartTransactionAction(); + } + + public static com.google.spanner.executor.v1.StartTransactionAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartTransactionAction 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.executor.v1.StartTransactionAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/StartTransactionActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/StartTransactionActionOrBuilder.java new file mode 100644 index 00000000000..b3019e84c78 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/StartTransactionActionOrBuilder.java @@ -0,0 +1,186 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface StartTransactionActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.StartTransactionAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Concurrency is for read-only transactions and must be omitted for
+   * read-write transactions.
+   * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + * + * @return Whether the concurrency field is set. + */ + boolean hasConcurrency(); + /** + * + * + *
+   * Concurrency is for read-only transactions and must be omitted for
+   * read-write transactions.
+   * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + * + * @return The concurrency. + */ + com.google.spanner.executor.v1.Concurrency getConcurrency(); + /** + * + * + *
+   * Concurrency is for read-only transactions and must be omitted for
+   * read-write transactions.
+   * 
+ * + * optional .google.spanner.executor.v1.Concurrency concurrency = 1; + */ + com.google.spanner.executor.v1.ConcurrencyOrBuilder getConcurrencyOrBuilder(); + + /** + * + * + *
+   * Metadata about tables and columns that will be involved in this
+   * transaction. It is to convert values of key parts correctly.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + java.util.List getTableList(); + /** + * + * + *
+   * Metadata about tables and columns that will be involved in this
+   * transaction. It is to convert values of key parts correctly.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + com.google.spanner.executor.v1.TableMetadata getTable(int index); + /** + * + * + *
+   * Metadata about tables and columns that will be involved in this
+   * transaction. It is to convert values of key parts correctly.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + int getTableCount(); + /** + * + * + *
+   * Metadata about tables and columns that will be involved in this
+   * transaction. It is to convert values of key parts correctly.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + java.util.List + getTableOrBuilderList(); + /** + * + * + *
+   * Metadata about tables and columns that will be involved in this
+   * transaction. It is to convert values of key parts correctly.
+   * 
+ * + * repeated .google.spanner.executor.v1.TableMetadata table = 2; + */ + com.google.spanner.executor.v1.TableMetadataOrBuilder getTableOrBuilder(int index); + + /** + * + * + *
+   * Transaction_seed contains workid and op pair for this transaction, used for
+   * testing.
+   * 
+ * + * string transaction_seed = 3; + * + * @return The transactionSeed. + */ + java.lang.String getTransactionSeed(); + /** + * + * + *
+   * Transaction_seed contains workid and op pair for this transaction, used for
+   * testing.
+   * 
+ * + * string transaction_seed = 3; + * + * @return The bytes for transactionSeed. + */ + com.google.protobuf.ByteString getTransactionSeedBytes(); + + /** + * + * + *
+   * Execution options (e.g., whether transaction is opaque, optimistic).
+   * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + * + * @return Whether the executionOptions field is set. + */ + boolean hasExecutionOptions(); + /** + * + * + *
+   * Execution options (e.g., whether transaction is opaque, optimistic).
+   * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + * + * @return The executionOptions. + */ + com.google.spanner.executor.v1.TransactionExecutionOptions getExecutionOptions(); + /** + * + * + *
+   * Execution options (e.g., whether transaction is opaque, optimistic).
+   * 
+ * + * optional .google.spanner.executor.v1.TransactionExecutionOptions execution_options = 4; + * + */ + com.google.spanner.executor.v1.TransactionExecutionOptionsOrBuilder + getExecutionOptionsOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/TableMetadata.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/TableMetadata.java new file mode 100644 index 00000000000..d7ab699a2ee --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/TableMetadata.java @@ -0,0 +1,1606 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * TableMetadata contains metadata of a single table.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.TableMetadata} + */ +public final class TableMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.TableMetadata) + TableMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use TableMetadata.newBuilder() to construct. + private TableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TableMetadata() { + name_ = ""; + column_ = java.util.Collections.emptyList(); + keyColumn_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TableMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_TableMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_TableMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.TableMetadata.class, + com.google.spanner.executor.v1.TableMetadata.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Table name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Table name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLUMN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List column_; + /** + * + * + *
+   * Columns, in the same order as in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + @java.lang.Override + public java.util.List getColumnList() { + return column_; + } + /** + * + * + *
+   * Columns, in the same order as in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + @java.lang.Override + public java.util.List + getColumnOrBuilderList() { + return column_; + } + /** + * + * + *
+   * Columns, in the same order as in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + @java.lang.Override + public int getColumnCount() { + return column_.size(); + } + /** + * + * + *
+   * Columns, in the same order as in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ColumnMetadata getColumn(int index) { + return column_.get(index); + } + /** + * + * + *
+   * Columns, in the same order as in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ColumnMetadataOrBuilder getColumnOrBuilder(int index) { + return column_.get(index); + } + + public static final int KEY_COLUMN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List keyColumn_; + /** + * + * + *
+   * Keys, in order. Column name is currently not populated.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + @java.lang.Override + public java.util.List getKeyColumnList() { + return keyColumn_; + } + /** + * + * + *
+   * Keys, in order. Column name is currently not populated.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + @java.lang.Override + public java.util.List + getKeyColumnOrBuilderList() { + return keyColumn_; + } + /** + * + * + *
+   * Keys, in order. Column name is currently not populated.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + @java.lang.Override + public int getKeyColumnCount() { + return keyColumn_.size(); + } + /** + * + * + *
+   * Keys, in order. Column name is currently not populated.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ColumnMetadata getKeyColumn(int index) { + return keyColumn_.get(index); + } + /** + * + * + *
+   * Keys, in order. Column name is currently not populated.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ColumnMetadataOrBuilder getKeyColumnOrBuilder(int index) { + return keyColumn_.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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < column_.size(); i++) { + output.writeMessage(2, column_.get(i)); + } + for (int i = 0; i < keyColumn_.size(); i++) { + output.writeMessage(3, keyColumn_.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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < column_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, column_.get(i)); + } + for (int i = 0; i < keyColumn_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, keyColumn_.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.executor.v1.TableMetadata)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.TableMetadata other = + (com.google.spanner.executor.v1.TableMetadata) obj; + + if (!getName().equals(other.getName())) return false; + if (!getColumnList().equals(other.getColumnList())) return false; + if (!getKeyColumnList().equals(other.getKeyColumnList())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getColumnCount() > 0) { + hash = (37 * hash) + COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getColumnList().hashCode(); + } + if (getKeyColumnCount() > 0) { + hash = (37 * hash) + KEY_COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getKeyColumnList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.TableMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.TableMetadata 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.executor.v1.TableMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.TableMetadata 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.executor.v1.TableMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.TableMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.TableMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.TableMetadata 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.executor.v1.TableMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.TableMetadata 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.executor.v1.TableMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.TableMetadata 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.executor.v1.TableMetadata 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; + } + /** + * + * + *
+   * TableMetadata contains metadata of a single table.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.TableMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.TableMetadata) + com.google.spanner.executor.v1.TableMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_TableMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_TableMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.TableMetadata.class, + com.google.spanner.executor.v1.TableMetadata.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.TableMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (columnBuilder_ == null) { + column_ = java.util.Collections.emptyList(); + } else { + column_ = null; + columnBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (keyColumnBuilder_ == null) { + keyColumn_ = java.util.Collections.emptyList(); + } else { + keyColumn_ = null; + keyColumnBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_TableMetadata_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.TableMetadata getDefaultInstanceForType() { + return com.google.spanner.executor.v1.TableMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.TableMetadata build() { + com.google.spanner.executor.v1.TableMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.TableMetadata buildPartial() { + com.google.spanner.executor.v1.TableMetadata result = + new com.google.spanner.executor.v1.TableMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.executor.v1.TableMetadata result) { + if (columnBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + column_ = java.util.Collections.unmodifiableList(column_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.column_ = column_; + } else { + result.column_ = columnBuilder_.build(); + } + if (keyColumnBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + keyColumn_ = java.util.Collections.unmodifiableList(keyColumn_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.keyColumn_ = keyColumn_; + } else { + result.keyColumn_ = keyColumnBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.TableMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.executor.v1.TableMetadata) { + return mergeFrom((com.google.spanner.executor.v1.TableMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.TableMetadata other) { + if (other == com.google.spanner.executor.v1.TableMetadata.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (columnBuilder_ == null) { + if (!other.column_.isEmpty()) { + if (column_.isEmpty()) { + column_ = other.column_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureColumnIsMutable(); + column_.addAll(other.column_); + } + onChanged(); + } + } else { + if (!other.column_.isEmpty()) { + if (columnBuilder_.isEmpty()) { + columnBuilder_.dispose(); + columnBuilder_ = null; + column_ = other.column_; + bitField0_ = (bitField0_ & ~0x00000002); + columnBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getColumnFieldBuilder() + : null; + } else { + columnBuilder_.addAllMessages(other.column_); + } + } + } + if (keyColumnBuilder_ == null) { + if (!other.keyColumn_.isEmpty()) { + if (keyColumn_.isEmpty()) { + keyColumn_ = other.keyColumn_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureKeyColumnIsMutable(); + keyColumn_.addAll(other.keyColumn_); + } + onChanged(); + } + } else { + if (!other.keyColumn_.isEmpty()) { + if (keyColumnBuilder_.isEmpty()) { + keyColumnBuilder_.dispose(); + keyColumnBuilder_ = null; + keyColumn_ = other.keyColumn_; + bitField0_ = (bitField0_ & ~0x00000004); + keyColumnBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getKeyColumnFieldBuilder() + : null; + } else { + keyColumnBuilder_.addAllMessages(other.keyColumn_); + } + } + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.spanner.executor.v1.ColumnMetadata m = + input.readMessage( + com.google.spanner.executor.v1.ColumnMetadata.parser(), extensionRegistry); + if (columnBuilder_ == null) { + ensureColumnIsMutable(); + column_.add(m); + } else { + columnBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.spanner.executor.v1.ColumnMetadata m = + input.readMessage( + com.google.spanner.executor.v1.ColumnMetadata.parser(), extensionRegistry); + if (keyColumnBuilder_ == null) { + ensureKeyColumnIsMutable(); + keyColumn_.add(m); + } else { + keyColumnBuilder_.addMessage(m); + } + 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 java.lang.Object name_ = ""; + /** + * + * + *
+     * Table name.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Table name.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Table name.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Table name.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Table name.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List column_ = + java.util.Collections.emptyList(); + + private void ensureColumnIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + column_ = new java.util.ArrayList(column_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ColumnMetadata, + com.google.spanner.executor.v1.ColumnMetadata.Builder, + com.google.spanner.executor.v1.ColumnMetadataOrBuilder> + columnBuilder_; + + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public java.util.List getColumnList() { + if (columnBuilder_ == null) { + return java.util.Collections.unmodifiableList(column_); + } else { + return columnBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public int getColumnCount() { + if (columnBuilder_ == null) { + return column_.size(); + } else { + return columnBuilder_.getCount(); + } + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public com.google.spanner.executor.v1.ColumnMetadata getColumn(int index) { + if (columnBuilder_ == null) { + return column_.get(index); + } else { + return columnBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public Builder setColumn(int index, com.google.spanner.executor.v1.ColumnMetadata value) { + if (columnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnIsMutable(); + column_.set(index, value); + onChanged(); + } else { + columnBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public Builder setColumn( + int index, com.google.spanner.executor.v1.ColumnMetadata.Builder builderForValue) { + if (columnBuilder_ == null) { + ensureColumnIsMutable(); + column_.set(index, builderForValue.build()); + onChanged(); + } else { + columnBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public Builder addColumn(com.google.spanner.executor.v1.ColumnMetadata value) { + if (columnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnIsMutable(); + column_.add(value); + onChanged(); + } else { + columnBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public Builder addColumn(int index, com.google.spanner.executor.v1.ColumnMetadata value) { + if (columnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnIsMutable(); + column_.add(index, value); + onChanged(); + } else { + columnBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public Builder addColumn( + com.google.spanner.executor.v1.ColumnMetadata.Builder builderForValue) { + if (columnBuilder_ == null) { + ensureColumnIsMutable(); + column_.add(builderForValue.build()); + onChanged(); + } else { + columnBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public Builder addColumn( + int index, com.google.spanner.executor.v1.ColumnMetadata.Builder builderForValue) { + if (columnBuilder_ == null) { + ensureColumnIsMutable(); + column_.add(index, builderForValue.build()); + onChanged(); + } else { + columnBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public Builder addAllColumn( + java.lang.Iterable values) { + if (columnBuilder_ == null) { + ensureColumnIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, column_); + onChanged(); + } else { + columnBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public Builder clearColumn() { + if (columnBuilder_ == null) { + column_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + columnBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public Builder removeColumn(int index) { + if (columnBuilder_ == null) { + ensureColumnIsMutable(); + column_.remove(index); + onChanged(); + } else { + columnBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public com.google.spanner.executor.v1.ColumnMetadata.Builder getColumnBuilder(int index) { + return getColumnFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public com.google.spanner.executor.v1.ColumnMetadataOrBuilder getColumnOrBuilder(int index) { + if (columnBuilder_ == null) { + return column_.get(index); + } else { + return columnBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public java.util.List + getColumnOrBuilderList() { + if (columnBuilder_ != null) { + return columnBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(column_); + } + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public com.google.spanner.executor.v1.ColumnMetadata.Builder addColumnBuilder() { + return getColumnFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.ColumnMetadata.getDefaultInstance()); + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public com.google.spanner.executor.v1.ColumnMetadata.Builder addColumnBuilder(int index) { + return getColumnFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.ColumnMetadata.getDefaultInstance()); + } + /** + * + * + *
+     * Columns, in the same order as in the schema.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + public java.util.List + getColumnBuilderList() { + return getColumnFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ColumnMetadata, + com.google.spanner.executor.v1.ColumnMetadata.Builder, + com.google.spanner.executor.v1.ColumnMetadataOrBuilder> + getColumnFieldBuilder() { + if (columnBuilder_ == null) { + columnBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ColumnMetadata, + com.google.spanner.executor.v1.ColumnMetadata.Builder, + com.google.spanner.executor.v1.ColumnMetadataOrBuilder>( + column_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + column_ = null; + } + return columnBuilder_; + } + + private java.util.List keyColumn_ = + java.util.Collections.emptyList(); + + private void ensureKeyColumnIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + keyColumn_ = + new java.util.ArrayList(keyColumn_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ColumnMetadata, + com.google.spanner.executor.v1.ColumnMetadata.Builder, + com.google.spanner.executor.v1.ColumnMetadataOrBuilder> + keyColumnBuilder_; + + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public java.util.List getKeyColumnList() { + if (keyColumnBuilder_ == null) { + return java.util.Collections.unmodifiableList(keyColumn_); + } else { + return keyColumnBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public int getKeyColumnCount() { + if (keyColumnBuilder_ == null) { + return keyColumn_.size(); + } else { + return keyColumnBuilder_.getCount(); + } + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public com.google.spanner.executor.v1.ColumnMetadata getKeyColumn(int index) { + if (keyColumnBuilder_ == null) { + return keyColumn_.get(index); + } else { + return keyColumnBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public Builder setKeyColumn(int index, com.google.spanner.executor.v1.ColumnMetadata value) { + if (keyColumnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeyColumnIsMutable(); + keyColumn_.set(index, value); + onChanged(); + } else { + keyColumnBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public Builder setKeyColumn( + int index, com.google.spanner.executor.v1.ColumnMetadata.Builder builderForValue) { + if (keyColumnBuilder_ == null) { + ensureKeyColumnIsMutable(); + keyColumn_.set(index, builderForValue.build()); + onChanged(); + } else { + keyColumnBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public Builder addKeyColumn(com.google.spanner.executor.v1.ColumnMetadata value) { + if (keyColumnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeyColumnIsMutable(); + keyColumn_.add(value); + onChanged(); + } else { + keyColumnBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public Builder addKeyColumn(int index, com.google.spanner.executor.v1.ColumnMetadata value) { + if (keyColumnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKeyColumnIsMutable(); + keyColumn_.add(index, value); + onChanged(); + } else { + keyColumnBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public Builder addKeyColumn( + com.google.spanner.executor.v1.ColumnMetadata.Builder builderForValue) { + if (keyColumnBuilder_ == null) { + ensureKeyColumnIsMutable(); + keyColumn_.add(builderForValue.build()); + onChanged(); + } else { + keyColumnBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public Builder addKeyColumn( + int index, com.google.spanner.executor.v1.ColumnMetadata.Builder builderForValue) { + if (keyColumnBuilder_ == null) { + ensureKeyColumnIsMutable(); + keyColumn_.add(index, builderForValue.build()); + onChanged(); + } else { + keyColumnBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public Builder addAllKeyColumn( + java.lang.Iterable values) { + if (keyColumnBuilder_ == null) { + ensureKeyColumnIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, keyColumn_); + onChanged(); + } else { + keyColumnBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public Builder clearKeyColumn() { + if (keyColumnBuilder_ == null) { + keyColumn_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + keyColumnBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public Builder removeKeyColumn(int index) { + if (keyColumnBuilder_ == null) { + ensureKeyColumnIsMutable(); + keyColumn_.remove(index); + onChanged(); + } else { + keyColumnBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public com.google.spanner.executor.v1.ColumnMetadata.Builder getKeyColumnBuilder(int index) { + return getKeyColumnFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public com.google.spanner.executor.v1.ColumnMetadataOrBuilder getKeyColumnOrBuilder(int index) { + if (keyColumnBuilder_ == null) { + return keyColumn_.get(index); + } else { + return keyColumnBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public java.util.List + getKeyColumnOrBuilderList() { + if (keyColumnBuilder_ != null) { + return keyColumnBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(keyColumn_); + } + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public com.google.spanner.executor.v1.ColumnMetadata.Builder addKeyColumnBuilder() { + return getKeyColumnFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.ColumnMetadata.getDefaultInstance()); + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public com.google.spanner.executor.v1.ColumnMetadata.Builder addKeyColumnBuilder(int index) { + return getKeyColumnFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.ColumnMetadata.getDefaultInstance()); + } + /** + * + * + *
+     * Keys, in order. Column name is currently not populated.
+     * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + public java.util.List + getKeyColumnBuilderList() { + return getKeyColumnFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ColumnMetadata, + com.google.spanner.executor.v1.ColumnMetadata.Builder, + com.google.spanner.executor.v1.ColumnMetadataOrBuilder> + getKeyColumnFieldBuilder() { + if (keyColumnBuilder_ == null) { + keyColumnBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.ColumnMetadata, + com.google.spanner.executor.v1.ColumnMetadata.Builder, + com.google.spanner.executor.v1.ColumnMetadataOrBuilder>( + keyColumn_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + keyColumn_ = null; + } + return keyColumnBuilder_; + } + + @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.executor.v1.TableMetadata) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.TableMetadata) + private static final com.google.spanner.executor.v1.TableMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.TableMetadata(); + } + + public static com.google.spanner.executor.v1.TableMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableMetadata 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.executor.v1.TableMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/TableMetadataOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/TableMetadataOrBuilder.java new file mode 100644 index 00000000000..31b3ffb83ba --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/TableMetadataOrBuilder.java @@ -0,0 +1,154 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface TableMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.TableMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Table name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Table name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Columns, in the same order as in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + java.util.List getColumnList(); + /** + * + * + *
+   * Columns, in the same order as in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + com.google.spanner.executor.v1.ColumnMetadata getColumn(int index); + /** + * + * + *
+   * Columns, in the same order as in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + int getColumnCount(); + /** + * + * + *
+   * Columns, in the same order as in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + java.util.List + getColumnOrBuilderList(); + /** + * + * + *
+   * Columns, in the same order as in the schema.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata column = 2; + */ + com.google.spanner.executor.v1.ColumnMetadataOrBuilder getColumnOrBuilder(int index); + + /** + * + * + *
+   * Keys, in order. Column name is currently not populated.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + java.util.List getKeyColumnList(); + /** + * + * + *
+   * Keys, in order. Column name is currently not populated.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + com.google.spanner.executor.v1.ColumnMetadata getKeyColumn(int index); + /** + * + * + *
+   * Keys, in order. Column name is currently not populated.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + int getKeyColumnCount(); + /** + * + * + *
+   * Keys, in order. Column name is currently not populated.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + java.util.List + getKeyColumnOrBuilderList(); + /** + * + * + *
+   * Keys, in order. Column name is currently not populated.
+   * 
+ * + * repeated .google.spanner.executor.v1.ColumnMetadata key_column = 3; + */ + com.google.spanner.executor.v1.ColumnMetadataOrBuilder getKeyColumnOrBuilder(int index); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/TransactionExecutionOptions.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/TransactionExecutionOptions.java new file mode 100644 index 00000000000..4770c3dfd4d --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/TransactionExecutionOptions.java @@ -0,0 +1,535 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Options for executing the transaction.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.TransactionExecutionOptions} + */ +public final class TransactionExecutionOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.TransactionExecutionOptions) + TransactionExecutionOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransactionExecutionOptions.newBuilder() to construct. + private TransactionExecutionOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransactionExecutionOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransactionExecutionOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_TransactionExecutionOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_TransactionExecutionOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.TransactionExecutionOptions.class, + com.google.spanner.executor.v1.TransactionExecutionOptions.Builder.class); + } + + public static final int OPTIMISTIC_FIELD_NUMBER = 1; + private boolean optimistic_ = false; + /** + * + * + *
+   * Whether optimistic concurrency should be used to execute this transaction.
+   * 
+ * + * bool optimistic = 1; + * + * @return The optimistic. + */ + @java.lang.Override + public boolean getOptimistic() { + return optimistic_; + } + + 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 (optimistic_ != false) { + output.writeBool(1, optimistic_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (optimistic_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, optimistic_); + } + 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.executor.v1.TransactionExecutionOptions)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.TransactionExecutionOptions other = + (com.google.spanner.executor.v1.TransactionExecutionOptions) obj; + + if (getOptimistic() != other.getOptimistic()) 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) + OPTIMISTIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOptimistic()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.TransactionExecutionOptions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.TransactionExecutionOptions 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.executor.v1.TransactionExecutionOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.TransactionExecutionOptions 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.executor.v1.TransactionExecutionOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.TransactionExecutionOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.TransactionExecutionOptions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.TransactionExecutionOptions 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.executor.v1.TransactionExecutionOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.TransactionExecutionOptions 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.executor.v1.TransactionExecutionOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.TransactionExecutionOptions 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.executor.v1.TransactionExecutionOptions 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; + } + /** + * + * + *
+   * Options for executing the transaction.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.TransactionExecutionOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.TransactionExecutionOptions) + com.google.spanner.executor.v1.TransactionExecutionOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_TransactionExecutionOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_TransactionExecutionOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.TransactionExecutionOptions.class, + com.google.spanner.executor.v1.TransactionExecutionOptions.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.TransactionExecutionOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + optimistic_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_TransactionExecutionOptions_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.TransactionExecutionOptions getDefaultInstanceForType() { + return com.google.spanner.executor.v1.TransactionExecutionOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.TransactionExecutionOptions build() { + com.google.spanner.executor.v1.TransactionExecutionOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.TransactionExecutionOptions buildPartial() { + com.google.spanner.executor.v1.TransactionExecutionOptions result = + new com.google.spanner.executor.v1.TransactionExecutionOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.TransactionExecutionOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.optimistic_ = optimistic_; + } + } + + @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.executor.v1.TransactionExecutionOptions) { + return mergeFrom((com.google.spanner.executor.v1.TransactionExecutionOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.TransactionExecutionOptions other) { + if (other == com.google.spanner.executor.v1.TransactionExecutionOptions.getDefaultInstance()) + return this; + if (other.getOptimistic() != false) { + setOptimistic(other.getOptimistic()); + } + 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: + { + optimistic_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 boolean optimistic_; + /** + * + * + *
+     * Whether optimistic concurrency should be used to execute this transaction.
+     * 
+ * + * bool optimistic = 1; + * + * @return The optimistic. + */ + @java.lang.Override + public boolean getOptimistic() { + return optimistic_; + } + /** + * + * + *
+     * Whether optimistic concurrency should be used to execute this transaction.
+     * 
+ * + * bool optimistic = 1; + * + * @param value The optimistic to set. + * @return This builder for chaining. + */ + public Builder setOptimistic(boolean value) { + + optimistic_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether optimistic concurrency should be used to execute this transaction.
+     * 
+ * + * bool optimistic = 1; + * + * @return This builder for chaining. + */ + public Builder clearOptimistic() { + bitField0_ = (bitField0_ & ~0x00000001); + optimistic_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.TransactionExecutionOptions) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.TransactionExecutionOptions) + private static final com.google.spanner.executor.v1.TransactionExecutionOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.TransactionExecutionOptions(); + } + + public static com.google.spanner.executor.v1.TransactionExecutionOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransactionExecutionOptions 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.executor.v1.TransactionExecutionOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/TransactionExecutionOptionsOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/TransactionExecutionOptionsOrBuilder.java new file mode 100644 index 00000000000..252a463d808 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/TransactionExecutionOptionsOrBuilder.java @@ -0,0 +1,38 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface TransactionExecutionOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.TransactionExecutionOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether optimistic concurrency should be used to execute this transaction.
+   * 
+ * + * bool optimistic = 1; + * + * @return The optimistic. + */ + boolean getOptimistic(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudBackupAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudBackupAction.java new file mode 100644 index 00000000000..d03b821373f --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudBackupAction.java @@ -0,0 +1,1282 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that updates a Cloud Spanner database backup.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.UpdateCloudBackupAction} + */ +public final class UpdateCloudBackupAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.UpdateCloudBackupAction) + UpdateCloudBackupActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCloudBackupAction.newBuilder() to construct. + private UpdateCloudBackupAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCloudBackupAction() { + projectId_ = ""; + instanceId_ = ""; + backupId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCloudBackupAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.UpdateCloudBackupAction.class, + com.google.spanner.executor.v1.UpdateCloudBackupAction.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupId_ = ""; + /** + * + * + *
+   * The id of the backup to update, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + @java.lang.Override + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + 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(); + backupId_ = s; + return s; + } + } + /** + * + * + *
+   * The id of the backup to update, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * Output only. Updated value of expire_time, this is the only field
+   * that supported to be updated.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return expireTime_ != null; + } + /** + * + * + *
+   * Output only. Updated value of expire_time, this is the only field
+   * that supported to be updated.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * Output only. Updated value of expire_time, this is the only field
+   * that supported to be updated.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + 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(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupId_); + } + if (expireTime_ != null) { + output.writeMessage(4, getExpireTime()); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupId_); + } + if (expireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExpireTime()); + } + 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.executor.v1.UpdateCloudBackupAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.UpdateCloudBackupAction other = + (com.google.spanner.executor.v1.UpdateCloudBackupAction) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getBackupId().equals(other.getBackupId())) return false; + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupId().hashCode(); + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.UpdateCloudBackupAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateCloudBackupAction 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.executor.v1.UpdateCloudBackupAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateCloudBackupAction 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.executor.v1.UpdateCloudBackupAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateCloudBackupAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.UpdateCloudBackupAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateCloudBackupAction 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.executor.v1.UpdateCloudBackupAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateCloudBackupAction 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.executor.v1.UpdateCloudBackupAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateCloudBackupAction 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.executor.v1.UpdateCloudBackupAction 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; + } + /** + * + * + *
+   * Action that updates a Cloud Spanner database backup.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.UpdateCloudBackupAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.UpdateCloudBackupAction) + com.google.spanner.executor.v1.UpdateCloudBackupActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.UpdateCloudBackupAction.class, + com.google.spanner.executor.v1.UpdateCloudBackupAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.UpdateCloudBackupAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + instanceId_ = ""; + backupId_ = ""; + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudBackupAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudBackupAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.UpdateCloudBackupAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudBackupAction build() { + com.google.spanner.executor.v1.UpdateCloudBackupAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudBackupAction buildPartial() { + com.google.spanner.executor.v1.UpdateCloudBackupAction result = + new com.google.spanner.executor.v1.UpdateCloudBackupAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.UpdateCloudBackupAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupId_ = backupId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.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.executor.v1.UpdateCloudBackupAction) { + return mergeFrom((com.google.spanner.executor.v1.UpdateCloudBackupAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.UpdateCloudBackupAction other) { + if (other == com.google.spanner.executor.v1.UpdateCloudBackupAction.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getBackupId().isEmpty()) { + backupId_ = other.backupId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + backupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + 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 projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 1; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object backupId_ = ""; + /** + * + * + *
+     * The id of the backup to update, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The id of the backup to update, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The id of the backup to update, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @param value The backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the backup to update, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearBackupId() { + backupId_ = getDefaultInstance().getBackupId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the backup to update, e.g. "test-backup".
+     * 
+ * + * string backup_id = 3; + * + * @param value The bytes for backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * Output only. Updated value of expire_time, this is the only field
+     * that supported to be updated.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Updated value of expire_time, this is the only field
+     * that supported to be updated.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Updated value of expire_time, this is the only field
+     * that supported to be updated.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + } else { + expireTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Updated value of expire_time, this is the only field
+     * that supported to be updated.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Updated value of expire_time, this is the only field
+     * that supported to be updated.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && expireTime_ != null + && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpireTimeBuilder().mergeFrom(value); + } else { + expireTime_ = value; + } + } else { + expireTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Updated value of expire_time, this is the only field
+     * that supported to be updated.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpireTime() { + bitField0_ = (bitField0_ & ~0x00000008); + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Updated value of expire_time, this is the only field
+     * that supported to be updated.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Updated value of expire_time, this is the only field
+     * that supported to be updated.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * Output only. Updated value of expire_time, this is the only field
+     * that supported to be updated.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + @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.executor.v1.UpdateCloudBackupAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.UpdateCloudBackupAction) + private static final com.google.spanner.executor.v1.UpdateCloudBackupAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.UpdateCloudBackupAction(); + } + + public static com.google.spanner.executor.v1.UpdateCloudBackupAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCloudBackupAction 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.executor.v1.UpdateCloudBackupAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudBackupActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudBackupActionOrBuilder.java new file mode 100644 index 00000000000..5df3e1907b1 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudBackupActionOrBuilder.java @@ -0,0 +1,141 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface UpdateCloudBackupActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.UpdateCloudBackupAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 1; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * The id of the backup to update, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The backupId. + */ + java.lang.String getBackupId(); + /** + * + * + *
+   * The id of the backup to update, e.g. "test-backup".
+   * 
+ * + * string backup_id = 3; + * + * @return The bytes for backupId. + */ + com.google.protobuf.ByteString getBackupIdBytes(); + + /** + * + * + *
+   * Output only. Updated value of expire_time, this is the only field
+   * that supported to be updated.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + /** + * + * + *
+   * Output only. Updated value of expire_time, this is the only field
+   * that supported to be updated.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * Output only. Updated value of expire_time, this is the only field
+   * that supported to be updated.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudDatabaseAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudDatabaseAction.java new file mode 100644 index 00000000000..a0deaeaacab --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudDatabaseAction.java @@ -0,0 +1,1086 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that updates a Cloud Spanner database.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.UpdateCloudDatabaseAction} + */ +public final class UpdateCloudDatabaseAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.UpdateCloudDatabaseAction) + UpdateCloudDatabaseActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCloudDatabaseAction.newBuilder() to construct. + private UpdateCloudDatabaseAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCloudDatabaseAction() { + instanceId_ = ""; + projectId_ = ""; + databaseName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCloudDatabaseAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.UpdateCloudDatabaseAction.class, + com.google.spanner.executor.v1.UpdateCloudDatabaseAction.Builder.class); + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseName_ = ""; + /** + * + * + *
+   * Cloud database name (not full path), e.g. "db0".
+   * 
+ * + * string database_name = 3; + * + * @return The databaseName. + */ + @java.lang.Override + public java.lang.String getDatabaseName() { + java.lang.Object ref = databaseName_; + 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(); + databaseName_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud database name (not full path), e.g. "db0".
+   * 
+ * + * string database_name = 3; + * + * @return The bytes for databaseName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseNameBytes() { + java.lang.Object ref = databaseName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLE_DROP_PROTECTION_FIELD_NUMBER = 4; + private boolean enableDropProtection_ = false; + /** + * + * + *
+   * Updated value of enable_drop_protection, this is the only field that has
+   * supported to be updated.
+   * 
+ * + * bool enable_drop_protection = 4; + * + * @return The enableDropProtection. + */ + @java.lang.Override + public boolean getEnableDropProtection() { + return enableDropProtection_; + } + + 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(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseName_); + } + if (enableDropProtection_ != false) { + output.writeBool(4, enableDropProtection_); + } + 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(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseName_); + } + if (enableDropProtection_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enableDropProtection_); + } + 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.executor.v1.UpdateCloudDatabaseAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.UpdateCloudDatabaseAction other = + (com.google.spanner.executor.v1.UpdateCloudDatabaseAction) obj; + + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getDatabaseName().equals(other.getDatabaseName())) return false; + if (getEnableDropProtection() != other.getEnableDropProtection()) 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) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + DATABASE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseName().hashCode(); + hash = (37 * hash) + ENABLE_DROP_PROTECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDropProtection()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseAction 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.executor.v1.UpdateCloudDatabaseAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseAction 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.executor.v1.UpdateCloudDatabaseAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseAction 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.executor.v1.UpdateCloudDatabaseAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseAction 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.executor.v1.UpdateCloudDatabaseAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseAction 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.executor.v1.UpdateCloudDatabaseAction 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; + } + /** + * + * + *
+   * Action that updates a Cloud Spanner database.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.UpdateCloudDatabaseAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.UpdateCloudDatabaseAction) + com.google.spanner.executor.v1.UpdateCloudDatabaseActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.UpdateCloudDatabaseAction.class, + com.google.spanner.executor.v1.UpdateCloudDatabaseAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.UpdateCloudDatabaseAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceId_ = ""; + projectId_ = ""; + databaseName_ = ""; + enableDropProtection_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.UpdateCloudDatabaseAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseAction build() { + com.google.spanner.executor.v1.UpdateCloudDatabaseAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseAction buildPartial() { + com.google.spanner.executor.v1.UpdateCloudDatabaseAction result = + new com.google.spanner.executor.v1.UpdateCloudDatabaseAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.UpdateCloudDatabaseAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.databaseName_ = databaseName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.enableDropProtection_ = enableDropProtection_; + } + } + + @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.executor.v1.UpdateCloudDatabaseAction) { + return mergeFrom((com.google.spanner.executor.v1.UpdateCloudDatabaseAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.UpdateCloudDatabaseAction other) { + if (other == com.google.spanner.executor.v1.UpdateCloudDatabaseAction.getDefaultInstance()) + return this; + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDatabaseName().isEmpty()) { + databaseName_ = other.databaseName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getEnableDropProtection() != false) { + setEnableDropProtection(other.getEnableDropProtection()); + } + 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: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + databaseName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + enableDropProtection_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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 instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object databaseName_ = ""; + /** + * + * + *
+     * Cloud database name (not full path), e.g. "db0".
+     * 
+ * + * string database_name = 3; + * + * @return The databaseName. + */ + public java.lang.String getDatabaseName() { + java.lang.Object ref = databaseName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud database name (not full path), e.g. "db0".
+     * 
+ * + * string database_name = 3; + * + * @return The bytes for databaseName. + */ + public com.google.protobuf.ByteString getDatabaseNameBytes() { + java.lang.Object ref = databaseName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud database name (not full path), e.g. "db0".
+     * 
+ * + * string database_name = 3; + * + * @param value The databaseName to set. + * @return This builder for chaining. + */ + public Builder setDatabaseName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud database name (not full path), e.g. "db0".
+     * 
+ * + * string database_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseName() { + databaseName_ = getDefaultInstance().getDatabaseName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud database name (not full path), e.g. "db0".
+     * 
+ * + * string database_name = 3; + * + * @param value The bytes for databaseName to set. + * @return This builder for chaining. + */ + public Builder setDatabaseNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean enableDropProtection_; + /** + * + * + *
+     * Updated value of enable_drop_protection, this is the only field that has
+     * supported to be updated.
+     * 
+ * + * bool enable_drop_protection = 4; + * + * @return The enableDropProtection. + */ + @java.lang.Override + public boolean getEnableDropProtection() { + return enableDropProtection_; + } + /** + * + * + *
+     * Updated value of enable_drop_protection, this is the only field that has
+     * supported to be updated.
+     * 
+ * + * bool enable_drop_protection = 4; + * + * @param value The enableDropProtection to set. + * @return This builder for chaining. + */ + public Builder setEnableDropProtection(boolean value) { + + enableDropProtection_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Updated value of enable_drop_protection, this is the only field that has
+     * supported to be updated.
+     * 
+ * + * bool enable_drop_protection = 4; + * + * @return This builder for chaining. + */ + public Builder clearEnableDropProtection() { + bitField0_ = (bitField0_ & ~0x00000008); + enableDropProtection_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.UpdateCloudDatabaseAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.UpdateCloudDatabaseAction) + private static final com.google.spanner.executor.v1.UpdateCloudDatabaseAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.UpdateCloudDatabaseAction(); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCloudDatabaseAction 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.executor.v1.UpdateCloudDatabaseAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudDatabaseActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudDatabaseActionOrBuilder.java new file mode 100644 index 00000000000..c2e887b6e7d --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudDatabaseActionOrBuilder.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 + * + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface UpdateCloudDatabaseActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.UpdateCloudDatabaseAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud database name (not full path), e.g. "db0".
+   * 
+ * + * string database_name = 3; + * + * @return The databaseName. + */ + java.lang.String getDatabaseName(); + /** + * + * + *
+   * Cloud database name (not full path), e.g. "db0".
+   * 
+ * + * string database_name = 3; + * + * @return The bytes for databaseName. + */ + com.google.protobuf.ByteString getDatabaseNameBytes(); + + /** + * + * + *
+   * Updated value of enable_drop_protection, this is the only field that has
+   * supported to be updated.
+   * 
+ * + * bool enable_drop_protection = 4; + * + * @return The enableDropProtection. + */ + boolean getEnableDropProtection(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudDatabaseDdlAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudDatabaseDdlAction.java new file mode 100644 index 00000000000..86e645c2dba --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudDatabaseDdlAction.java @@ -0,0 +1,1561 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that updates the schema of a Cloud Spanner database.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.UpdateCloudDatabaseDdlAction} + */ +public final class UpdateCloudDatabaseDdlAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) + UpdateCloudDatabaseDdlActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCloudDatabaseDdlAction.newBuilder() to construct. + private UpdateCloudDatabaseDdlAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCloudDatabaseDdlAction() { + instanceId_ = ""; + projectId_ = ""; + databaseId_ = ""; + sdlStatement_ = com.google.protobuf.LazyStringArrayList.emptyList(); + operationId_ = ""; + protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCloudDatabaseDdlAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.class, + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.Builder.class); + } + + private int bitField0_; + public static final int INSTANCE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseId_ = ""; + /** + * + * + *
+   * Cloud database ID (not full path), e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + @java.lang.Override + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + 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(); + databaseId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud database ID (not full path), e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SDL_STATEMENT_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList sdlStatement_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * SDL statements to apply to the database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @return A list containing the sdlStatement. + */ + public com.google.protobuf.ProtocolStringList getSdlStatementList() { + return sdlStatement_; + } + /** + * + * + *
+   * SDL statements to apply to the database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @return The count of sdlStatement. + */ + public int getSdlStatementCount() { + return sdlStatement_.size(); + } + /** + * + * + *
+   * SDL statements to apply to the database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index of the element to return. + * @return The sdlStatement at the given index. + */ + public java.lang.String getSdlStatement(int index) { + return sdlStatement_.get(index); + } + /** + * + * + *
+   * SDL statements to apply to the database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index of the value to return. + * @return The bytes of the sdlStatement at the given index. + */ + public com.google.protobuf.ByteString getSdlStatementBytes(int index) { + return sdlStatement_.getByteString(index); + } + + public static final int OPERATION_ID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object operationId_ = ""; + /** + * + * + *
+   * Op ID can be used to track progress of the update. If set, it must be
+   * unique per database. If not set, Cloud Spanner will generate operation ID
+   * automatically.
+   * 
+ * + * string operation_id = 5; + * + * @return The operationId. + */ + @java.lang.Override + public java.lang.String getOperationId() { + java.lang.Object ref = operationId_; + 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(); + operationId_ = s; + return s; + } + } + /** + * + * + *
+   * Op ID can be used to track progress of the update. If set, it must be
+   * unique per database. If not set, Cloud Spanner will generate operation ID
+   * automatically.
+   * 
+ * + * string operation_id = 5; + * + * @return The bytes for operationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOperationIdBytes() { + java.lang.Object ref = operationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTO_DESCRIPTORS_FIELD_NUMBER = 6; + private com.google.protobuf.ByteString protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes proto_descriptors = 6; + * + * @return Whether the protoDescriptors field is set. + */ + @java.lang.Override + public boolean hasProtoDescriptors() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional bytes proto_descriptors = 6; + * + * @return The protoDescriptors. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtoDescriptors() { + return protoDescriptors_; + } + + 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(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, databaseId_); + } + for (int i = 0; i < sdlStatement_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sdlStatement_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, operationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBytes(6, protoDescriptors_); + } + 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(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, databaseId_); + } + { + int dataSize = 0; + for (int i = 0; i < sdlStatement_.size(); i++) { + dataSize += computeStringSizeNoTag(sdlStatement_.getRaw(i)); + } + size += dataSize; + size += 1 * getSdlStatementList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, operationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(6, protoDescriptors_); + } + 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.executor.v1.UpdateCloudDatabaseDdlAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction other = + (com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) obj; + + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getDatabaseId().equals(other.getDatabaseId())) return false; + if (!getSdlStatementList().equals(other.getSdlStatementList())) return false; + if (!getOperationId().equals(other.getOperationId())) return false; + if (hasProtoDescriptors() != other.hasProtoDescriptors()) return false; + if (hasProtoDescriptors()) { + if (!getProtoDescriptors().equals(other.getProtoDescriptors())) 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) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + DATABASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseId().hashCode(); + if (getSdlStatementCount() > 0) { + hash = (37 * hash) + SDL_STATEMENT_FIELD_NUMBER; + hash = (53 * hash) + getSdlStatementList().hashCode(); + } + hash = (37 * hash) + OPERATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getOperationId().hashCode(); + if (hasProtoDescriptors()) { + hash = (37 * hash) + PROTO_DESCRIPTORS_FIELD_NUMBER; + hash = (53 * hash) + getProtoDescriptors().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction 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.executor.v1.UpdateCloudDatabaseDdlAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction 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.executor.v1.UpdateCloudDatabaseDdlAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction 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.executor.v1.UpdateCloudDatabaseDdlAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction 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.executor.v1.UpdateCloudDatabaseDdlAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction 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.executor.v1.UpdateCloudDatabaseDdlAction 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; + } + /** + * + * + *
+   * Action that updates the schema of a Cloud Spanner database.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.UpdateCloudDatabaseDdlAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.class, + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceId_ = ""; + projectId_ = ""; + databaseId_ = ""; + sdlStatement_ = com.google.protobuf.LazyStringArrayList.emptyList(); + operationId_ = ""; + protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudDatabaseDdlAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction build() { + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction buildPartial() { + com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction result = + new com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.databaseId_ = databaseId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + sdlStatement_.makeImmutable(); + result.sdlStatement_ = sdlStatement_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.operationId_ = operationId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.protoDescriptors_ = protoDescriptors_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_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.executor.v1.UpdateCloudDatabaseDdlAction) { + return mergeFrom((com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction other) { + if (other == com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction.getDefaultInstance()) + return this; + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDatabaseId().isEmpty()) { + databaseId_ = other.databaseId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.sdlStatement_.isEmpty()) { + if (sdlStatement_.isEmpty()) { + sdlStatement_ = other.sdlStatement_; + bitField0_ |= 0x00000008; + } else { + ensureSdlStatementIsMutable(); + sdlStatement_.addAll(other.sdlStatement_); + } + onChanged(); + } + if (!other.getOperationId().isEmpty()) { + operationId_ = other.operationId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasProtoDescriptors()) { + setProtoDescriptors(other.getProtoDescriptors()); + } + 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: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + databaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSdlStatementIsMutable(); + sdlStatement_.add(s); + break; + } // case 34 + case 42: + { + operationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + protoDescriptors_ = input.readBytes(); + bitField0_ |= 0x00000020; + break; + } // case 50 + 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 instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object databaseId_ = ""; + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + public java.lang.String getDatabaseId() { + java.lang.Object ref = databaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + public com.google.protobuf.ByteString getDatabaseIdBytes() { + java.lang.Object ref = databaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @param value The databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseId() { + databaseId_ = getDefaultInstance().getDatabaseId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud database ID (not full path), e.g. "db0".
+     * 
+ * + * string database_id = 3; + * + * @param value The bytes for databaseId to set. + * @return This builder for chaining. + */ + public Builder setDatabaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList sdlStatement_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSdlStatementIsMutable() { + if (!sdlStatement_.isModifiable()) { + sdlStatement_ = new com.google.protobuf.LazyStringArrayList(sdlStatement_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * SDL statements to apply to the database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @return A list containing the sdlStatement. + */ + public com.google.protobuf.ProtocolStringList getSdlStatementList() { + sdlStatement_.makeImmutable(); + return sdlStatement_; + } + /** + * + * + *
+     * SDL statements to apply to the database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @return The count of sdlStatement. + */ + public int getSdlStatementCount() { + return sdlStatement_.size(); + } + /** + * + * + *
+     * SDL statements to apply to the database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index of the element to return. + * @return The sdlStatement at the given index. + */ + public java.lang.String getSdlStatement(int index) { + return sdlStatement_.get(index); + } + /** + * + * + *
+     * SDL statements to apply to the database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index of the value to return. + * @return The bytes of the sdlStatement at the given index. + */ + public com.google.protobuf.ByteString getSdlStatementBytes(int index) { + return sdlStatement_.getByteString(index); + } + /** + * + * + *
+     * SDL statements to apply to the database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index to set the value at. + * @param value The sdlStatement to set. + * @return This builder for chaining. + */ + public Builder setSdlStatement(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSdlStatementIsMutable(); + sdlStatement_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * SDL statements to apply to the database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @param value The sdlStatement to add. + * @return This builder for chaining. + */ + public Builder addSdlStatement(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSdlStatementIsMutable(); + sdlStatement_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * SDL statements to apply to the database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @param values The sdlStatement to add. + * @return This builder for chaining. + */ + public Builder addAllSdlStatement(java.lang.Iterable values) { + ensureSdlStatementIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sdlStatement_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * SDL statements to apply to the database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @return This builder for chaining. + */ + public Builder clearSdlStatement() { + sdlStatement_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * SDL statements to apply to the database.
+     * 
+ * + * repeated string sdl_statement = 4; + * + * @param value The bytes of the sdlStatement to add. + * @return This builder for chaining. + */ + public Builder addSdlStatementBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSdlStatementIsMutable(); + sdlStatement_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object operationId_ = ""; + /** + * + * + *
+     * Op ID can be used to track progress of the update. If set, it must be
+     * unique per database. If not set, Cloud Spanner will generate operation ID
+     * automatically.
+     * 
+ * + * string operation_id = 5; + * + * @return The operationId. + */ + public java.lang.String getOperationId() { + java.lang.Object ref = operationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Op ID can be used to track progress of the update. If set, it must be
+     * unique per database. If not set, Cloud Spanner will generate operation ID
+     * automatically.
+     * 
+ * + * string operation_id = 5; + * + * @return The bytes for operationId. + */ + public com.google.protobuf.ByteString getOperationIdBytes() { + java.lang.Object ref = operationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Op ID can be used to track progress of the update. If set, it must be
+     * unique per database. If not set, Cloud Spanner will generate operation ID
+     * automatically.
+     * 
+ * + * string operation_id = 5; + * + * @param value The operationId to set. + * @return This builder for chaining. + */ + public Builder setOperationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + operationId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Op ID can be used to track progress of the update. If set, it must be
+     * unique per database. If not set, Cloud Spanner will generate operation ID
+     * automatically.
+     * 
+ * + * string operation_id = 5; + * + * @return This builder for chaining. + */ + public Builder clearOperationId() { + operationId_ = getDefaultInstance().getOperationId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Op ID can be used to track progress of the update. If set, it must be
+     * unique per database. If not set, Cloud Spanner will generate operation ID
+     * automatically.
+     * 
+ * + * string operation_id = 5; + * + * @param value The bytes for operationId to set. + * @return This builder for chaining. + */ + public Builder setOperationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + operationId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes proto_descriptors = 6; + * + * @return Whether the protoDescriptors field is set. + */ + @java.lang.Override + public boolean hasProtoDescriptors() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * optional bytes proto_descriptors = 6; + * + * @return The protoDescriptors. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtoDescriptors() { + return protoDescriptors_; + } + /** + * optional bytes proto_descriptors = 6; + * + * @param value The protoDescriptors to set. + * @return This builder for chaining. + */ + public Builder setProtoDescriptors(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + protoDescriptors_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * optional bytes proto_descriptors = 6; + * + * @return This builder for chaining. + */ + public Builder clearProtoDescriptors() { + bitField0_ = (bitField0_ & ~0x00000020); + protoDescriptors_ = getDefaultInstance().getProtoDescriptors(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) + private static final com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction(); + } + + public static com.google.spanner.executor.v1.UpdateCloudDatabaseDdlAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCloudDatabaseDdlAction 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.executor.v1.UpdateCloudDatabaseDdlAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudDatabaseDdlActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudDatabaseDdlActionOrBuilder.java new file mode 100644 index 00000000000..9a0b79ff9cd --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudDatabaseDdlActionOrBuilder.java @@ -0,0 +1,193 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface UpdateCloudDatabaseDdlActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.UpdateCloudDatabaseDdlAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Cloud database ID (not full path), e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The databaseId. + */ + java.lang.String getDatabaseId(); + /** + * + * + *
+   * Cloud database ID (not full path), e.g. "db0".
+   * 
+ * + * string database_id = 3; + * + * @return The bytes for databaseId. + */ + com.google.protobuf.ByteString getDatabaseIdBytes(); + + /** + * + * + *
+   * SDL statements to apply to the database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @return A list containing the sdlStatement. + */ + java.util.List getSdlStatementList(); + /** + * + * + *
+   * SDL statements to apply to the database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @return The count of sdlStatement. + */ + int getSdlStatementCount(); + /** + * + * + *
+   * SDL statements to apply to the database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index of the element to return. + * @return The sdlStatement at the given index. + */ + java.lang.String getSdlStatement(int index); + /** + * + * + *
+   * SDL statements to apply to the database.
+   * 
+ * + * repeated string sdl_statement = 4; + * + * @param index The index of the value to return. + * @return The bytes of the sdlStatement at the given index. + */ + com.google.protobuf.ByteString getSdlStatementBytes(int index); + + /** + * + * + *
+   * Op ID can be used to track progress of the update. If set, it must be
+   * unique per database. If not set, Cloud Spanner will generate operation ID
+   * automatically.
+   * 
+ * + * string operation_id = 5; + * + * @return The operationId. + */ + java.lang.String getOperationId(); + /** + * + * + *
+   * Op ID can be used to track progress of the update. If set, it must be
+   * unique per database. If not set, Cloud Spanner will generate operation ID
+   * automatically.
+   * 
+ * + * string operation_id = 5; + * + * @return The bytes for operationId. + */ + com.google.protobuf.ByteString getOperationIdBytes(); + + /** + * optional bytes proto_descriptors = 6; + * + * @return Whether the protoDescriptors field is set. + */ + boolean hasProtoDescriptors(); + /** + * optional bytes proto_descriptors = 6; + * + * @return The protoDescriptors. + */ + com.google.protobuf.ByteString getProtoDescriptors(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudInstanceAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudInstanceAction.java new file mode 100644 index 00000000000..7fe449ce299 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudInstanceAction.java @@ -0,0 +1,1959 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that updates a Cloud Spanner instance.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.UpdateCloudInstanceAction} + */ +public final class UpdateCloudInstanceAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.UpdateCloudInstanceAction) + UpdateCloudInstanceActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCloudInstanceAction.newBuilder() to construct. + private UpdateCloudInstanceAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCloudInstanceAction() { + instanceId_ = ""; + projectId_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCloudInstanceAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.UpdateCloudInstanceAction.class, + com.google.spanner.executor.v1.UpdateCloudInstanceAction.Builder.class); + } + + private int bitField0_; + public static final int INSTANCE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * The descriptive name for this instance as it appears in UIs.
+   * Must be unique per project and between 4 and 30 characters in length.
+   * 
+ * + * optional string display_name = 3; + * + * @return Whether the displayName field is set. + */ + @java.lang.Override + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The descriptive name for this instance as it appears in UIs.
+   * Must be unique per project and between 4 and 30 characters in length.
+   * 
+ * + * optional string display_name = 3; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The descriptive name for this instance as it appears in UIs.
+   * Must be unique per project and between 4 and 30 characters in length.
+   * 
+ * + * optional string display_name = 3; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_COUNT_FIELD_NUMBER = 4; + private int nodeCount_ = 0; + /** + * + * + *
+   * The number of nodes allocated to this instance. At most one of either
+   * node_count or processing_units should be present in the message.
+   * 
+ * + * optional int32 node_count = 4; + * + * @return Whether the nodeCount field is set. + */ + @java.lang.Override + public boolean hasNodeCount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The number of nodes allocated to this instance. At most one of either
+   * node_count or processing_units should be present in the message.
+   * 
+ * + * optional int32 node_count = 4; + * + * @return The nodeCount. + */ + @java.lang.Override + public int getNodeCount() { + return nodeCount_; + } + + public static final int PROCESSING_UNITS_FIELD_NUMBER = 5; + private int processingUnits_ = 0; + /** + * + * + *
+   * The number of processing units allocated to this instance. At most one of
+   * processing_units or node_count should be present in the message.
+   * 
+ * + * optional int32 processing_units = 5; + * + * @return Whether the processingUnits field is set. + */ + @java.lang.Override + public boolean hasProcessingUnits() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The number of processing units allocated to this instance. At most one of
+   * processing_units or node_count should be present in the message.
+   * 
+ * + * optional int32 processing_units = 5; + * + * @return The processingUnits. + */ + @java.lang.Override + public int getProcessingUnits() { + return processingUnits_; + } + + public static final int AUTOSCALING_CONFIG_FIELD_NUMBER = 7; + private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_; + /** + * + * + *
+   * The autoscaling config for this instance. If non-empty, this instance is
+   * using autoscaling (processing_units and node_count should be set to
+   * 0 if used).
+   * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + * + * @return Whether the autoscalingConfig field is set. + */ + @java.lang.Override + public boolean hasAutoscalingConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * The autoscaling config for this instance. If non-empty, this instance is
+   * using autoscaling (processing_units and node_count should be set to
+   * 0 if used).
+   * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + * + * @return The autoscalingConfig. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig getAutoscalingConfig() { + return autoscalingConfig_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance() + : autoscalingConfig_; + } + /** + * + * + *
+   * The autoscaling config for this instance. If non-empty, this instance is
+   * using autoscaling (processing_units and node_count should be set to
+   * 0 if used).
+   * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder + getAutoscalingConfigOrBuilder() { + return autoscalingConfig_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance() + : autoscalingConfig_; + } + + public static final int LABELS_FIELD_NUMBER = 6; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(4, nodeCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt32(5, processingUnits_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getAutoscalingConfig()); + } + 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(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, nodeCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, processingUnits_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, labels__); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAutoscalingConfig()); + } + 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.executor.v1.UpdateCloudInstanceAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.UpdateCloudInstanceAction other = + (com.google.spanner.executor.v1.UpdateCloudInstanceAction) obj; + + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (hasDisplayName() != other.hasDisplayName()) return false; + if (hasDisplayName()) { + if (!getDisplayName().equals(other.getDisplayName())) return false; + } + if (hasNodeCount() != other.hasNodeCount()) return false; + if (hasNodeCount()) { + if (getNodeCount() != other.getNodeCount()) return false; + } + if (hasProcessingUnits() != other.hasProcessingUnits()) return false; + if (hasProcessingUnits()) { + if (getProcessingUnits() != other.getProcessingUnits()) return false; + } + if (hasAutoscalingConfig() != other.hasAutoscalingConfig()) return false; + if (hasAutoscalingConfig()) { + if (!getAutoscalingConfig().equals(other.getAutoscalingConfig())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) 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) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + if (hasDisplayName()) { + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + } + if (hasNodeCount()) { + hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getNodeCount(); + } + if (hasProcessingUnits()) { + hash = (37 * hash) + PROCESSING_UNITS_FIELD_NUMBER; + hash = (53 * hash) + getProcessingUnits(); + } + if (hasAutoscalingConfig()) { + hash = (37 * hash) + AUTOSCALING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAutoscalingConfig().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.UpdateCloudInstanceAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateCloudInstanceAction 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.executor.v1.UpdateCloudInstanceAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateCloudInstanceAction 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.executor.v1.UpdateCloudInstanceAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateCloudInstanceAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.UpdateCloudInstanceAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateCloudInstanceAction 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.executor.v1.UpdateCloudInstanceAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateCloudInstanceAction 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.executor.v1.UpdateCloudInstanceAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateCloudInstanceAction 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.executor.v1.UpdateCloudInstanceAction 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; + } + /** + * + * + *
+   * Action that updates a Cloud Spanner instance.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.UpdateCloudInstanceAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.UpdateCloudInstanceAction) + com.google.spanner.executor.v1.UpdateCloudInstanceActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 6: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.UpdateCloudInstanceAction.class, + com.google.spanner.executor.v1.UpdateCloudInstanceAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.UpdateCloudInstanceAction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAutoscalingConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceId_ = ""; + projectId_ = ""; + displayName_ = ""; + nodeCount_ = 0; + processingUnits_ = 0; + autoscalingConfig_ = null; + if (autoscalingConfigBuilder_ != null) { + autoscalingConfigBuilder_.dispose(); + autoscalingConfigBuilder_ = null; + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateCloudInstanceAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudInstanceAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.UpdateCloudInstanceAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudInstanceAction build() { + com.google.spanner.executor.v1.UpdateCloudInstanceAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateCloudInstanceAction buildPartial() { + com.google.spanner.executor.v1.UpdateCloudInstanceAction result = + new com.google.spanner.executor.v1.UpdateCloudInstanceAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.UpdateCloudInstanceAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.nodeCount_ = nodeCount_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.processingUnits_ = processingUnits_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.autoscalingConfig_ = + autoscalingConfigBuilder_ == null + ? autoscalingConfig_ + : autoscalingConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + result.bitField0_ |= to_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.executor.v1.UpdateCloudInstanceAction) { + return mergeFrom((com.google.spanner.executor.v1.UpdateCloudInstanceAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.UpdateCloudInstanceAction other) { + if (other == com.google.spanner.executor.v1.UpdateCloudInstanceAction.getDefaultInstance()) + return this; + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDisplayName()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasNodeCount()) { + setNodeCount(other.getNodeCount()); + } + if (other.hasProcessingUnits()) { + setProcessingUnits(other.getProcessingUnits()); + } + if (other.hasAutoscalingConfig()) { + mergeAutoscalingConfig(other.getAutoscalingConfig()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + 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: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + nodeCount_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + processingUnits_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + input.readMessage( + getAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + 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 instanceId_ = ""; + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud instance ID (not path), e.g. "test-instance".
+     * 
+ * + * string instance_id = 1; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The descriptive name for this instance as it appears in UIs.
+     * Must be unique per project and between 4 and 30 characters in length.
+     * 
+ * + * optional string display_name = 3; + * + * @return Whether the displayName field is set. + */ + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The descriptive name for this instance as it appears in UIs.
+     * Must be unique per project and between 4 and 30 characters in length.
+     * 
+ * + * optional string display_name = 3; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The descriptive name for this instance as it appears in UIs.
+     * Must be unique per project and between 4 and 30 characters in length.
+     * 
+ * + * optional string display_name = 3; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The descriptive name for this instance as it appears in UIs.
+     * Must be unique per project and between 4 and 30 characters in length.
+     * 
+ * + * optional string display_name = 3; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The descriptive name for this instance as it appears in UIs.
+     * Must be unique per project and between 4 and 30 characters in length.
+     * 
+ * + * optional string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The descriptive name for this instance as it appears in UIs.
+     * Must be unique per project and between 4 and 30 characters in length.
+     * 
+ * + * optional string display_name = 3; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int nodeCount_; + /** + * + * + *
+     * The number of nodes allocated to this instance. At most one of either
+     * node_count or processing_units should be present in the message.
+     * 
+ * + * optional int32 node_count = 4; + * + * @return Whether the nodeCount field is set. + */ + @java.lang.Override + public boolean hasNodeCount() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The number of nodes allocated to this instance. At most one of either
+     * node_count or processing_units should be present in the message.
+     * 
+ * + * optional int32 node_count = 4; + * + * @return The nodeCount. + */ + @java.lang.Override + public int getNodeCount() { + return nodeCount_; + } + /** + * + * + *
+     * The number of nodes allocated to this instance. At most one of either
+     * node_count or processing_units should be present in the message.
+     * 
+ * + * optional int32 node_count = 4; + * + * @param value The nodeCount to set. + * @return This builder for chaining. + */ + public Builder setNodeCount(int value) { + + nodeCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of nodes allocated to this instance. At most one of either
+     * node_count or processing_units should be present in the message.
+     * 
+ * + * optional int32 node_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearNodeCount() { + bitField0_ = (bitField0_ & ~0x00000008); + nodeCount_ = 0; + onChanged(); + return this; + } + + private int processingUnits_; + /** + * + * + *
+     * The number of processing units allocated to this instance. At most one of
+     * processing_units or node_count should be present in the message.
+     * 
+ * + * optional int32 processing_units = 5; + * + * @return Whether the processingUnits field is set. + */ + @java.lang.Override + public boolean hasProcessingUnits() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The number of processing units allocated to this instance. At most one of
+     * processing_units or node_count should be present in the message.
+     * 
+ * + * optional int32 processing_units = 5; + * + * @return The processingUnits. + */ + @java.lang.Override + public int getProcessingUnits() { + return processingUnits_; + } + /** + * + * + *
+     * The number of processing units allocated to this instance. At most one of
+     * processing_units or node_count should be present in the message.
+     * 
+ * + * optional int32 processing_units = 5; + * + * @param value The processingUnits to set. + * @return This builder for chaining. + */ + public Builder setProcessingUnits(int value) { + + processingUnits_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of processing units allocated to this instance. At most one of
+     * processing_units or node_count should be present in the message.
+     * 
+ * + * optional int32 processing_units = 5; + * + * @return This builder for chaining. + */ + public Builder clearProcessingUnits() { + bitField0_ = (bitField0_ & ~0x00000010); + processingUnits_ = 0; + onChanged(); + return this; + } + + private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig, + com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder> + autoscalingConfigBuilder_; + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, this instance is
+     * using autoscaling (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + * + * @return Whether the autoscalingConfig field is set. + */ + public boolean hasAutoscalingConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, this instance is
+     * using autoscaling (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + * + * @return The autoscalingConfig. + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig getAutoscalingConfig() { + if (autoscalingConfigBuilder_ == null) { + return autoscalingConfig_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance() + : autoscalingConfig_; + } else { + return autoscalingConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, this instance is
+     * using autoscaling (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + public Builder setAutoscalingConfig( + com.google.spanner.admin.instance.v1.AutoscalingConfig value) { + if (autoscalingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoscalingConfig_ = value; + } else { + autoscalingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, this instance is
+     * using autoscaling (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + public Builder setAutoscalingConfig( + com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder builderForValue) { + if (autoscalingConfigBuilder_ == null) { + autoscalingConfig_ = builderForValue.build(); + } else { + autoscalingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, this instance is
+     * using autoscaling (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + public Builder mergeAutoscalingConfig( + com.google.spanner.admin.instance.v1.AutoscalingConfig value) { + if (autoscalingConfigBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && autoscalingConfig_ != null + && autoscalingConfig_ + != com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance()) { + getAutoscalingConfigBuilder().mergeFrom(value); + } else { + autoscalingConfig_ = value; + } + } else { + autoscalingConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, this instance is
+     * using autoscaling (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + public Builder clearAutoscalingConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + autoscalingConfig_ = null; + if (autoscalingConfigBuilder_ != null) { + autoscalingConfigBuilder_.dispose(); + autoscalingConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, this instance is
+     * using autoscaling (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder + getAutoscalingConfigBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getAutoscalingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, this instance is
+     * using autoscaling (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder + getAutoscalingConfigOrBuilder() { + if (autoscalingConfigBuilder_ != null) { + return autoscalingConfigBuilder_.getMessageOrBuilder(); + } else { + return autoscalingConfig_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance() + : autoscalingConfig_; + } + } + /** + * + * + *
+     * The autoscaling config for this instance. If non-empty, this instance is
+     * using autoscaling (processing_units and node_count should be set to
+     * 0 if used).
+     * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig, + com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder> + getAutoscalingConfigFieldBuilder() { + if (autoscalingConfigBuilder_ == null) { + autoscalingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig, + com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder>( + getAutoscalingConfig(), getParentForChildren(), isClean()); + autoscalingConfig_ = null; + } + return autoscalingConfigBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 6; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 6; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 6; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.UpdateCloudInstanceAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.UpdateCloudInstanceAction) + private static final com.google.spanner.executor.v1.UpdateCloudInstanceAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.UpdateCloudInstanceAction(); + } + + public static com.google.spanner.executor.v1.UpdateCloudInstanceAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCloudInstanceAction 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.executor.v1.UpdateCloudInstanceAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudInstanceActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudInstanceActionOrBuilder.java new file mode 100644 index 00000000000..c5a8732c17e --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateCloudInstanceActionOrBuilder.java @@ -0,0 +1,271 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface UpdateCloudInstanceActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.UpdateCloudInstanceAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Cloud instance ID (not path), e.g. "test-instance".
+   * 
+ * + * string instance_id = 1; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * The descriptive name for this instance as it appears in UIs.
+   * Must be unique per project and between 4 and 30 characters in length.
+   * 
+ * + * optional string display_name = 3; + * + * @return Whether the displayName field is set. + */ + boolean hasDisplayName(); + /** + * + * + *
+   * The descriptive name for this instance as it appears in UIs.
+   * Must be unique per project and between 4 and 30 characters in length.
+   * 
+ * + * optional string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The descriptive name for this instance as it appears in UIs.
+   * Must be unique per project and between 4 and 30 characters in length.
+   * 
+ * + * optional string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The number of nodes allocated to this instance. At most one of either
+   * node_count or processing_units should be present in the message.
+   * 
+ * + * optional int32 node_count = 4; + * + * @return Whether the nodeCount field is set. + */ + boolean hasNodeCount(); + /** + * + * + *
+   * The number of nodes allocated to this instance. At most one of either
+   * node_count or processing_units should be present in the message.
+   * 
+ * + * optional int32 node_count = 4; + * + * @return The nodeCount. + */ + int getNodeCount(); + + /** + * + * + *
+   * The number of processing units allocated to this instance. At most one of
+   * processing_units or node_count should be present in the message.
+   * 
+ * + * optional int32 processing_units = 5; + * + * @return Whether the processingUnits field is set. + */ + boolean hasProcessingUnits(); + /** + * + * + *
+   * The number of processing units allocated to this instance. At most one of
+   * processing_units or node_count should be present in the message.
+   * 
+ * + * optional int32 processing_units = 5; + * + * @return The processingUnits. + */ + int getProcessingUnits(); + + /** + * + * + *
+   * The autoscaling config for this instance. If non-empty, this instance is
+   * using autoscaling (processing_units and node_count should be set to
+   * 0 if used).
+   * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + * + * @return Whether the autoscalingConfig field is set. + */ + boolean hasAutoscalingConfig(); + /** + * + * + *
+   * The autoscaling config for this instance. If non-empty, this instance is
+   * using autoscaling (processing_units and node_count should be set to
+   * 0 if used).
+   * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + * + * @return The autoscalingConfig. + */ + com.google.spanner.admin.instance.v1.AutoscalingConfig getAutoscalingConfig(); + /** + * + * + *
+   * The autoscaling config for this instance. If non-empty, this instance is
+   * using autoscaling (processing_units and node_count should be set to
+   * 0 if used).
+   * 
+ * + * optional .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 7; + * + */ + com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder getAutoscalingConfigOrBuilder(); + + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 6; + */ + int getLabelsCount(); + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 6; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 6; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 6; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 6; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateUserInstanceConfigAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateUserInstanceConfigAction.java new file mode 100644 index 00000000000..553f3d8d5fd --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateUserInstanceConfigAction.java @@ -0,0 +1,1364 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Action that updates a user instance config.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.UpdateUserInstanceConfigAction} + */ +public final class UpdateUserInstanceConfigAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.UpdateUserInstanceConfigAction) + UpdateUserInstanceConfigActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateUserInstanceConfigAction.newBuilder() to construct. + private UpdateUserInstanceConfigAction( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateUserInstanceConfigAction() { + userConfigId_ = ""; + projectId_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateUserInstanceConfigAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.class, + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.Builder.class); + } + + private int bitField0_; + public static final int USER_CONFIG_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object userConfigId_ = ""; + /** + * + * + *
+   * User instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string user_config_id = 1; + * + * @return The userConfigId. + */ + @java.lang.Override + public java.lang.String getUserConfigId() { + java.lang.Object ref = userConfigId_; + 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(); + userConfigId_ = s; + return s; + } + } + /** + * + * + *
+   * User instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string user_config_id = 1; + * + * @return The bytes for userConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserConfigIdBytes() { + java.lang.Object ref = userConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + 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(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * The descriptive name for this instance config as it appears in UIs.
+   * 
+ * + * optional string display_name = 3; + * + * @return Whether the displayName field is set. + */ + @java.lang.Override + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The descriptive name for this instance config as it appears in UIs.
+   * 
+ * + * optional string display_name = 3; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The descriptive name for this instance config as it appears in UIs.
+   * 
+ * + * optional string display_name = 3; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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(userConfigId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userConfigId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + 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(userConfigId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userConfigId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + 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.executor.v1.UpdateUserInstanceConfigAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction other = + (com.google.spanner.executor.v1.UpdateUserInstanceConfigAction) obj; + + if (!getUserConfigId().equals(other.getUserConfigId())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (hasDisplayName() != other.hasDisplayName()) return false; + if (hasDisplayName()) { + if (!getDisplayName().equals(other.getDisplayName())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) 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) + USER_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserConfigId().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + if (hasDisplayName()) { + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.UpdateUserInstanceConfigAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateUserInstanceConfigAction 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.executor.v1.UpdateUserInstanceConfigAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateUserInstanceConfigAction 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.executor.v1.UpdateUserInstanceConfigAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.UpdateUserInstanceConfigAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.UpdateUserInstanceConfigAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateUserInstanceConfigAction 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.executor.v1.UpdateUserInstanceConfigAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateUserInstanceConfigAction 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.executor.v1.UpdateUserInstanceConfigAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.UpdateUserInstanceConfigAction 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.executor.v1.UpdateUserInstanceConfigAction 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; + } + /** + * + * + *
+   * Action that updates a user instance config.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.UpdateUserInstanceConfigAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.UpdateUserInstanceConfigAction) + com.google.spanner.executor.v1.UpdateUserInstanceConfigActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.class, + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userConfigId_ = ""; + projectId_ = ""; + displayName_ = ""; + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_UpdateUserInstanceConfigAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateUserInstanceConfigAction + getDefaultInstanceForType() { + return com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateUserInstanceConfigAction build() { + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.UpdateUserInstanceConfigAction buildPartial() { + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction result = + new com.google.spanner.executor.v1.UpdateUserInstanceConfigAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.executor.v1.UpdateUserInstanceConfigAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userConfigId_ = userConfigId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectId_ = projectId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + result.bitField0_ |= to_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.executor.v1.UpdateUserInstanceConfigAction) { + return mergeFrom((com.google.spanner.executor.v1.UpdateUserInstanceConfigAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.UpdateUserInstanceConfigAction other) { + if (other + == com.google.spanner.executor.v1.UpdateUserInstanceConfigAction.getDefaultInstance()) + return this; + if (!other.getUserConfigId().isEmpty()) { + userConfigId_ = other.userConfigId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDisplayName()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + 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: + { + userConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + 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 userConfigId_ = ""; + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @return The userConfigId. + */ + public java.lang.String getUserConfigId() { + java.lang.Object ref = userConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @return The bytes for userConfigId. + */ + public com.google.protobuf.ByteString getUserConfigIdBytes() { + java.lang.Object ref = userConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @param value The userConfigId to set. + * @return This builder for chaining. + */ + public Builder setUserConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userConfigId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearUserConfigId() { + userConfigId_ = getDefaultInstance().getUserConfigId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * User instance config ID (not path), e.g. "custom-config".
+     * 
+ * + * string user_config_id = 1; + * + * @param value The bytes for userConfigId to set. + * @return This builder for chaining. + */ + public Builder setUserConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userConfigId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud project ID, e.g. "spanner-cloud-systest".
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The descriptive name for this instance config as it appears in UIs.
+     * 
+ * + * optional string display_name = 3; + * + * @return Whether the displayName field is set. + */ + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The descriptive name for this instance config as it appears in UIs.
+     * 
+ * + * optional string display_name = 3; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The descriptive name for this instance config as it appears in UIs.
+     * 
+ * + * optional string display_name = 3; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The descriptive name for this instance config as it appears in UIs.
+     * 
+ * + * optional string display_name = 3; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The descriptive name for this instance config as it appears in UIs.
+     * 
+ * + * optional string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The descriptive name for this instance config as it appears in UIs.
+     * 
+ * + * optional string display_name = 3; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * labels.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.executor.v1.UpdateUserInstanceConfigAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.UpdateUserInstanceConfigAction) + private static final com.google.spanner.executor.v1.UpdateUserInstanceConfigAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.UpdateUserInstanceConfigAction(); + } + + public static com.google.spanner.executor.v1.UpdateUserInstanceConfigAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateUserInstanceConfigAction 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.executor.v1.UpdateUserInstanceConfigAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateUserInstanceConfigActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateUserInstanceConfigActionOrBuilder.java new file mode 100644 index 00000000000..2635287c66f --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/UpdateUserInstanceConfigActionOrBuilder.java @@ -0,0 +1,170 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface UpdateUserInstanceConfigActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.UpdateUserInstanceConfigAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * User instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string user_config_id = 1; + * + * @return The userConfigId. + */ + java.lang.String getUserConfigId(); + /** + * + * + *
+   * User instance config ID (not path), e.g. "custom-config".
+   * 
+ * + * string user_config_id = 1; + * + * @return The bytes for userConfigId. + */ + com.google.protobuf.ByteString getUserConfigIdBytes(); + + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Cloud project ID, e.g. "spanner-cloud-systest".
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * The descriptive name for this instance config as it appears in UIs.
+   * 
+ * + * optional string display_name = 3; + * + * @return Whether the displayName field is set. + */ + boolean hasDisplayName(); + /** + * + * + *
+   * The descriptive name for this instance config as it appears in UIs.
+   * 
+ * + * optional string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The descriptive name for this instance config as it appears in UIs.
+   * 
+ * + * optional string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/Value.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/Value.java new file mode 100644 index 00000000000..86061d944ef --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/Value.java @@ -0,0 +1,2882 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * Value represents a single value that can be read or written to/from
+ * Spanner.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.Value} + */ +public final class Value extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.Value) + ValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use Value.newBuilder() to construct. + private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Value() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Value(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.Value.class, + com.google.spanner.executor.v1.Value.Builder.class); + } + + private int bitField0_; + private int valueTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object valueType_; + + public enum ValueTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + IS_NULL(1), + INT_VALUE(2), + BOOL_VALUE(3), + DOUBLE_VALUE(4), + BYTES_VALUE(5), + STRING_VALUE(6), + STRUCT_VALUE(7), + TIMESTAMP_VALUE(8), + DATE_DAYS_VALUE(9), + IS_COMMIT_TIMESTAMP(10), + ARRAY_VALUE(11), + VALUETYPE_NOT_SET(0); + private final int value; + + private ValueTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ValueTypeCase forNumber(int value) { + switch (value) { + case 1: + return IS_NULL; + case 2: + return INT_VALUE; + case 3: + return BOOL_VALUE; + case 4: + return DOUBLE_VALUE; + case 5: + return BYTES_VALUE; + case 6: + return STRING_VALUE; + case 7: + return STRUCT_VALUE; + case 8: + return TIMESTAMP_VALUE; + case 9: + return DATE_DAYS_VALUE; + case 10: + return IS_COMMIT_TIMESTAMP; + case 11: + return ARRAY_VALUE; + case 0: + return VALUETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueTypeCase getValueTypeCase() { + return ValueTypeCase.forNumber(valueTypeCase_); + } + + public static final int IS_NULL_FIELD_NUMBER = 1; + /** + * + * + *
+   * If is_null is set, then this value is null.
+   * 
+ * + * bool is_null = 1; + * + * @return Whether the isNull field is set. + */ + @java.lang.Override + public boolean hasIsNull() { + return valueTypeCase_ == 1; + } + /** + * + * + *
+   * If is_null is set, then this value is null.
+   * 
+ * + * bool is_null = 1; + * + * @return The isNull. + */ + @java.lang.Override + public boolean getIsNull() { + if (valueTypeCase_ == 1) { + return (java.lang.Boolean) valueType_; + } + return false; + } + + public static final int INT_VALUE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Int type value. It's used for all integer number types, like int32 and
+   * int64.
+   * 
+ * + * int64 int_value = 2; + * + * @return Whether the intValue field is set. + */ + @java.lang.Override + public boolean hasIntValue() { + return valueTypeCase_ == 2; + } + /** + * + * + *
+   * Int type value. It's used for all integer number types, like int32 and
+   * int64.
+   * 
+ * + * int64 int_value = 2; + * + * @return The intValue. + */ + @java.lang.Override + public long getIntValue() { + if (valueTypeCase_ == 2) { + return (java.lang.Long) valueType_; + } + return 0L; + } + + public static final int BOOL_VALUE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Bool type value.
+   * 
+ * + * bool bool_value = 3; + * + * @return Whether the boolValue field is set. + */ + @java.lang.Override + public boolean hasBoolValue() { + return valueTypeCase_ == 3; + } + /** + * + * + *
+   * Bool type value.
+   * 
+ * + * bool bool_value = 3; + * + * @return The boolValue. + */ + @java.lang.Override + public boolean getBoolValue() { + if (valueTypeCase_ == 3) { + return (java.lang.Boolean) valueType_; + } + return false; + } + + public static final int DOUBLE_VALUE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Double type value. It's used for all float point types, like float and
+   * double.
+   * 
+ * + * double double_value = 4; + * + * @return Whether the doubleValue field is set. + */ + @java.lang.Override + public boolean hasDoubleValue() { + return valueTypeCase_ == 4; + } + /** + * + * + *
+   * Double type value. It's used for all float point types, like float and
+   * double.
+   * 
+ * + * double double_value = 4; + * + * @return The doubleValue. + */ + @java.lang.Override + public double getDoubleValue() { + if (valueTypeCase_ == 4) { + return (java.lang.Double) valueType_; + } + return 0D; + } + + public static final int BYTES_VALUE_FIELD_NUMBER = 5; + /** + * + * + *
+   * Bytes type value, stored in CORD. It's also used for PROTO type value.
+   * 
+ * + * bytes bytes_value = 5; + * + * @return Whether the bytesValue field is set. + */ + @java.lang.Override + public boolean hasBytesValue() { + return valueTypeCase_ == 5; + } + /** + * + * + *
+   * Bytes type value, stored in CORD. It's also used for PROTO type value.
+   * 
+ * + * bytes bytes_value = 5; + * + * @return The bytesValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBytesValue() { + if (valueTypeCase_ == 5) { + return (com.google.protobuf.ByteString) valueType_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int STRING_VALUE_FIELD_NUMBER = 6; + /** + * + * + *
+   * String type value, stored in CORD.
+   * 
+ * + * string string_value = 6; + * + * @return Whether the stringValue field is set. + */ + public boolean hasStringValue() { + return valueTypeCase_ == 6; + } + /** + * + * + *
+   * String type value, stored in CORD.
+   * 
+ * + * string string_value = 6; + * + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 6) { + ref = valueType_; + } + 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(); + if (valueTypeCase_ == 6) { + valueType_ = s; + } + return s; + } + } + /** + * + * + *
+   * String type value, stored in CORD.
+   * 
+ * + * string string_value = 6; + * + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 6) { + ref = valueType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueTypeCase_ == 6) { + valueType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRUCT_VALUE_FIELD_NUMBER = 7; + /** + * + * + *
+   * Struct type value. It contains a ValueList representing the values in
+   * this struct.
+   * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + * + * @return Whether the structValue field is set. + */ + @java.lang.Override + public boolean hasStructValue() { + return valueTypeCase_ == 7; + } + /** + * + * + *
+   * Struct type value. It contains a ValueList representing the values in
+   * this struct.
+   * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + * + * @return The structValue. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueList getStructValue() { + if (valueTypeCase_ == 7) { + return (com.google.spanner.executor.v1.ValueList) valueType_; + } + return com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } + /** + * + * + *
+   * Struct type value. It contains a ValueList representing the values in
+   * this struct.
+   * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueListOrBuilder getStructValueOrBuilder() { + if (valueTypeCase_ == 7) { + return (com.google.spanner.executor.v1.ValueList) valueType_; + } + return com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } + + public static final int TIMESTAMP_VALUE_FIELD_NUMBER = 8; + /** + * + * + *
+   * Timestamp type value.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + * + * @return Whether the timestampValue field is set. + */ + @java.lang.Override + public boolean hasTimestampValue() { + return valueTypeCase_ == 8; + } + /** + * + * + *
+   * Timestamp type value.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + * + * @return The timestampValue. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestampValue() { + if (valueTypeCase_ == 8) { + return (com.google.protobuf.Timestamp) valueType_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + * + * + *
+   * Timestamp type value.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { + if (valueTypeCase_ == 8) { + return (com.google.protobuf.Timestamp) valueType_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int DATE_DAYS_VALUE_FIELD_NUMBER = 9; + /** + * + * + *
+   * Date type value. Date is specified as a number of days since Unix epoch.
+   * 
+ * + * int32 date_days_value = 9; + * + * @return Whether the dateDaysValue field is set. + */ + @java.lang.Override + public boolean hasDateDaysValue() { + return valueTypeCase_ == 9; + } + /** + * + * + *
+   * Date type value. Date is specified as a number of days since Unix epoch.
+   * 
+ * + * int32 date_days_value = 9; + * + * @return The dateDaysValue. + */ + @java.lang.Override + public int getDateDaysValue() { + if (valueTypeCase_ == 9) { + return (java.lang.Integer) valueType_; + } + return 0; + } + + public static final int IS_COMMIT_TIMESTAMP_FIELD_NUMBER = 10; + /** + * + * + *
+   * If set, holds the sentinel value for the transaction CommitTimestamp.
+   * 
+ * + * bool is_commit_timestamp = 10; + * + * @return Whether the isCommitTimestamp field is set. + */ + @java.lang.Override + public boolean hasIsCommitTimestamp() { + return valueTypeCase_ == 10; + } + /** + * + * + *
+   * If set, holds the sentinel value for the transaction CommitTimestamp.
+   * 
+ * + * bool is_commit_timestamp = 10; + * + * @return The isCommitTimestamp. + */ + @java.lang.Override + public boolean getIsCommitTimestamp() { + if (valueTypeCase_ == 10) { + return (java.lang.Boolean) valueType_; + } + return false; + } + + public static final int ARRAY_VALUE_FIELD_NUMBER = 11; + /** + * + * + *
+   * Array type value. The underlying Valuelist should have values that have
+   * the same type.
+   * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + * + * @return Whether the arrayValue field is set. + */ + @java.lang.Override + public boolean hasArrayValue() { + return valueTypeCase_ == 11; + } + /** + * + * + *
+   * Array type value. The underlying Valuelist should have values that have
+   * the same type.
+   * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + * + * @return The arrayValue. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueList getArrayValue() { + if (valueTypeCase_ == 11) { + return (com.google.spanner.executor.v1.ValueList) valueType_; + } + return com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } + /** + * + * + *
+   * Array type value. The underlying Valuelist should have values that have
+   * the same type.
+   * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueListOrBuilder getArrayValueOrBuilder() { + if (valueTypeCase_ == 11) { + return (com.google.spanner.executor.v1.ValueList) valueType_; + } + return com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } + + public static final int ARRAY_TYPE_FIELD_NUMBER = 12; + private com.google.spanner.v1.Type arrayType_; + /** + * + * + *
+   * Type of array element. Only set if value is an array.
+   * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + * + * @return Whether the arrayType field is set. + */ + @java.lang.Override + public boolean hasArrayType() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Type of array element. Only set if value is an array.
+   * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + * + * @return The arrayType. + */ + @java.lang.Override + public com.google.spanner.v1.Type getArrayType() { + return arrayType_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : arrayType_; + } + /** + * + * + *
+   * Type of array element. Only set if value is an array.
+   * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + */ + @java.lang.Override + public com.google.spanner.v1.TypeOrBuilder getArrayTypeOrBuilder() { + return arrayType_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : arrayType_; + } + + 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 (valueTypeCase_ == 1) { + output.writeBool(1, (boolean) ((java.lang.Boolean) valueType_)); + } + if (valueTypeCase_ == 2) { + output.writeInt64(2, (long) ((java.lang.Long) valueType_)); + } + if (valueTypeCase_ == 3) { + output.writeBool(3, (boolean) ((java.lang.Boolean) valueType_)); + } + if (valueTypeCase_ == 4) { + output.writeDouble(4, (double) ((java.lang.Double) valueType_)); + } + if (valueTypeCase_ == 5) { + output.writeBytes(5, (com.google.protobuf.ByteString) valueType_); + } + if (valueTypeCase_ == 6) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, valueType_); + } + if (valueTypeCase_ == 7) { + output.writeMessage(7, (com.google.spanner.executor.v1.ValueList) valueType_); + } + if (valueTypeCase_ == 8) { + output.writeMessage(8, (com.google.protobuf.Timestamp) valueType_); + } + if (valueTypeCase_ == 9) { + output.writeInt32(9, (int) ((java.lang.Integer) valueType_)); + } + if (valueTypeCase_ == 10) { + output.writeBool(10, (boolean) ((java.lang.Boolean) valueType_)); + } + if (valueTypeCase_ == 11) { + output.writeMessage(11, (com.google.spanner.executor.v1.ValueList) valueType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(12, getArrayType()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueTypeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 1, (boolean) ((java.lang.Boolean) valueType_)); + } + if (valueTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 2, (long) ((java.lang.Long) valueType_)); + } + if (valueTypeCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, (boolean) ((java.lang.Boolean) valueType_)); + } + if (valueTypeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 4, (double) ((java.lang.Double) valueType_)); + } + if (valueTypeCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 5, (com.google.protobuf.ByteString) valueType_); + } + if (valueTypeCase_ == 6) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, valueType_); + } + if (valueTypeCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.spanner.executor.v1.ValueList) valueType_); + } + if (valueTypeCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.protobuf.Timestamp) valueType_); + } + if (valueTypeCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 9, (int) ((java.lang.Integer) valueType_)); + } + if (valueTypeCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 10, (boolean) ((java.lang.Boolean) valueType_)); + } + if (valueTypeCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.spanner.executor.v1.ValueList) valueType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getArrayType()); + } + 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.executor.v1.Value)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.Value other = (com.google.spanner.executor.v1.Value) obj; + + if (hasArrayType() != other.hasArrayType()) return false; + if (hasArrayType()) { + if (!getArrayType().equals(other.getArrayType())) return false; + } + if (!getValueTypeCase().equals(other.getValueTypeCase())) return false; + switch (valueTypeCase_) { + case 1: + if (getIsNull() != other.getIsNull()) return false; + break; + case 2: + if (getIntValue() != other.getIntValue()) return false; + break; + case 3: + if (getBoolValue() != other.getBoolValue()) return false; + break; + case 4: + if (java.lang.Double.doubleToLongBits(getDoubleValue()) + != java.lang.Double.doubleToLongBits(other.getDoubleValue())) return false; + break; + case 5: + if (!getBytesValue().equals(other.getBytesValue())) return false; + break; + case 6: + if (!getStringValue().equals(other.getStringValue())) return false; + break; + case 7: + if (!getStructValue().equals(other.getStructValue())) return false; + break; + case 8: + if (!getTimestampValue().equals(other.getTimestampValue())) return false; + break; + case 9: + if (getDateDaysValue() != other.getDateDaysValue()) return false; + break; + case 10: + if (getIsCommitTimestamp() != other.getIsCommitTimestamp()) return false; + break; + case 11: + if (!getArrayValue().equals(other.getArrayValue())) return false; + break; + case 0: + default: + } + 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 (hasArrayType()) { + hash = (37 * hash) + ARRAY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getArrayType().hashCode(); + } + switch (valueTypeCase_) { + case 1: + hash = (37 * hash) + IS_NULL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsNull()); + break; + case 2: + hash = (37 * hash) + INT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIntValue()); + break; + case 3: + hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoolValue()); + break; + case 4: + hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDoubleValue())); + break; + case 5: + hash = (37 * hash) + BYTES_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getBytesValue().hashCode(); + break; + case 6: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 7: + hash = (37 * hash) + STRUCT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStructValue().hashCode(); + break; + case 8: + hash = (37 * hash) + TIMESTAMP_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTimestampValue().hashCode(); + break; + case 9: + hash = (37 * hash) + DATE_DAYS_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDateDaysValue(); + break; + case 10: + hash = (37 * hash) + IS_COMMIT_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsCommitTimestamp()); + break; + case 11: + hash = (37 * hash) + ARRAY_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getArrayValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.Value parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.Value 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.executor.v1.Value parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.Value 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.executor.v1.Value parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.Value parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.Value parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.Value 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.executor.v1.Value parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.Value 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.executor.v1.Value parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.Value 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.executor.v1.Value 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; + } + /** + * + * + *
+   * Value represents a single value that can be read or written to/from
+   * Spanner.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.Value} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.Value) + com.google.spanner.executor.v1.ValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.Value.class, + com.google.spanner.executor.v1.Value.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.Value.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getArrayTypeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (structValueBuilder_ != null) { + structValueBuilder_.clear(); + } + if (timestampValueBuilder_ != null) { + timestampValueBuilder_.clear(); + } + if (arrayValueBuilder_ != null) { + arrayValueBuilder_.clear(); + } + arrayType_ = null; + if (arrayTypeBuilder_ != null) { + arrayTypeBuilder_.dispose(); + arrayTypeBuilder_ = null; + } + valueTypeCase_ = 0; + valueType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_Value_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.Value getDefaultInstanceForType() { + return com.google.spanner.executor.v1.Value.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.Value build() { + com.google.spanner.executor.v1.Value result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.Value buildPartial() { + com.google.spanner.executor.v1.Value result = new com.google.spanner.executor.v1.Value(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.Value result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000800) != 0)) { + result.arrayType_ = arrayTypeBuilder_ == null ? arrayType_ : arrayTypeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.spanner.executor.v1.Value result) { + result.valueTypeCase_ = valueTypeCase_; + result.valueType_ = this.valueType_; + if (valueTypeCase_ == 7 && structValueBuilder_ != null) { + result.valueType_ = structValueBuilder_.build(); + } + if (valueTypeCase_ == 8 && timestampValueBuilder_ != null) { + result.valueType_ = timestampValueBuilder_.build(); + } + if (valueTypeCase_ == 11 && arrayValueBuilder_ != null) { + result.valueType_ = arrayValueBuilder_.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.executor.v1.Value) { + return mergeFrom((com.google.spanner.executor.v1.Value) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.Value other) { + if (other == com.google.spanner.executor.v1.Value.getDefaultInstance()) return this; + if (other.hasArrayType()) { + mergeArrayType(other.getArrayType()); + } + switch (other.getValueTypeCase()) { + case IS_NULL: + { + setIsNull(other.getIsNull()); + break; + } + case INT_VALUE: + { + setIntValue(other.getIntValue()); + break; + } + case BOOL_VALUE: + { + setBoolValue(other.getBoolValue()); + break; + } + case DOUBLE_VALUE: + { + setDoubleValue(other.getDoubleValue()); + break; + } + case BYTES_VALUE: + { + setBytesValue(other.getBytesValue()); + break; + } + case STRING_VALUE: + { + valueTypeCase_ = 6; + valueType_ = other.valueType_; + onChanged(); + break; + } + case STRUCT_VALUE: + { + mergeStructValue(other.getStructValue()); + break; + } + case TIMESTAMP_VALUE: + { + mergeTimestampValue(other.getTimestampValue()); + break; + } + case DATE_DAYS_VALUE: + { + setDateDaysValue(other.getDateDaysValue()); + break; + } + case IS_COMMIT_TIMESTAMP: + { + setIsCommitTimestamp(other.getIsCommitTimestamp()); + break; + } + case ARRAY_VALUE: + { + mergeArrayValue(other.getArrayValue()); + break; + } + case VALUETYPE_NOT_SET: + { + break; + } + } + 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: + { + valueType_ = input.readBool(); + valueTypeCase_ = 1; + break; + } // case 8 + case 16: + { + valueType_ = input.readInt64(); + valueTypeCase_ = 2; + break; + } // case 16 + case 24: + { + valueType_ = input.readBool(); + valueTypeCase_ = 3; + break; + } // case 24 + case 33: + { + valueType_ = input.readDouble(); + valueTypeCase_ = 4; + break; + } // case 33 + case 42: + { + valueType_ = input.readBytes(); + valueTypeCase_ = 5; + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + valueTypeCase_ = 6; + valueType_ = s; + break; + } // case 50 + case 58: + { + input.readMessage(getStructValueFieldBuilder().getBuilder(), extensionRegistry); + valueTypeCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage(getTimestampValueFieldBuilder().getBuilder(), extensionRegistry); + valueTypeCase_ = 8; + break; + } // case 66 + case 72: + { + valueType_ = input.readInt32(); + valueTypeCase_ = 9; + break; + } // case 72 + case 80: + { + valueType_ = input.readBool(); + valueTypeCase_ = 10; + break; + } // case 80 + case 90: + { + input.readMessage(getArrayValueFieldBuilder().getBuilder(), extensionRegistry); + valueTypeCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage(getArrayTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 98 + 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 valueTypeCase_ = 0; + private java.lang.Object valueType_; + + public ValueTypeCase getValueTypeCase() { + return ValueTypeCase.forNumber(valueTypeCase_); + } + + public Builder clearValueType() { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * If is_null is set, then this value is null.
+     * 
+ * + * bool is_null = 1; + * + * @return Whether the isNull field is set. + */ + public boolean hasIsNull() { + return valueTypeCase_ == 1; + } + /** + * + * + *
+     * If is_null is set, then this value is null.
+     * 
+ * + * bool is_null = 1; + * + * @return The isNull. + */ + public boolean getIsNull() { + if (valueTypeCase_ == 1) { + return (java.lang.Boolean) valueType_; + } + return false; + } + /** + * + * + *
+     * If is_null is set, then this value is null.
+     * 
+ * + * bool is_null = 1; + * + * @param value The isNull to set. + * @return This builder for chaining. + */ + public Builder setIsNull(boolean value) { + + valueTypeCase_ = 1; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If is_null is set, then this value is null.
+     * 
+ * + * bool is_null = 1; + * + * @return This builder for chaining. + */ + public Builder clearIsNull() { + if (valueTypeCase_ == 1) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Int type value. It's used for all integer number types, like int32 and
+     * int64.
+     * 
+ * + * int64 int_value = 2; + * + * @return Whether the intValue field is set. + */ + public boolean hasIntValue() { + return valueTypeCase_ == 2; + } + /** + * + * + *
+     * Int type value. It's used for all integer number types, like int32 and
+     * int64.
+     * 
+ * + * int64 int_value = 2; + * + * @return The intValue. + */ + public long getIntValue() { + if (valueTypeCase_ == 2) { + return (java.lang.Long) valueType_; + } + return 0L; + } + /** + * + * + *
+     * Int type value. It's used for all integer number types, like int32 and
+     * int64.
+     * 
+ * + * int64 int_value = 2; + * + * @param value The intValue to set. + * @return This builder for chaining. + */ + public Builder setIntValue(long value) { + + valueTypeCase_ = 2; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Int type value. It's used for all integer number types, like int32 and
+     * int64.
+     * 
+ * + * int64 int_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearIntValue() { + if (valueTypeCase_ == 2) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Bool type value.
+     * 
+ * + * bool bool_value = 3; + * + * @return Whether the boolValue field is set. + */ + public boolean hasBoolValue() { + return valueTypeCase_ == 3; + } + /** + * + * + *
+     * Bool type value.
+     * 
+ * + * bool bool_value = 3; + * + * @return The boolValue. + */ + public boolean getBoolValue() { + if (valueTypeCase_ == 3) { + return (java.lang.Boolean) valueType_; + } + return false; + } + /** + * + * + *
+     * Bool type value.
+     * 
+ * + * bool bool_value = 3; + * + * @param value The boolValue to set. + * @return This builder for chaining. + */ + public Builder setBoolValue(boolean value) { + + valueTypeCase_ = 3; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Bool type value.
+     * 
+ * + * bool bool_value = 3; + * + * @return This builder for chaining. + */ + public Builder clearBoolValue() { + if (valueTypeCase_ == 3) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Double type value. It's used for all float point types, like float and
+     * double.
+     * 
+ * + * double double_value = 4; + * + * @return Whether the doubleValue field is set. + */ + public boolean hasDoubleValue() { + return valueTypeCase_ == 4; + } + /** + * + * + *
+     * Double type value. It's used for all float point types, like float and
+     * double.
+     * 
+ * + * double double_value = 4; + * + * @return The doubleValue. + */ + public double getDoubleValue() { + if (valueTypeCase_ == 4) { + return (java.lang.Double) valueType_; + } + return 0D; + } + /** + * + * + *
+     * Double type value. It's used for all float point types, like float and
+     * double.
+     * 
+ * + * double double_value = 4; + * + * @param value The doubleValue to set. + * @return This builder for chaining. + */ + public Builder setDoubleValue(double value) { + + valueTypeCase_ = 4; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Double type value. It's used for all float point types, like float and
+     * double.
+     * 
+ * + * double double_value = 4; + * + * @return This builder for chaining. + */ + public Builder clearDoubleValue() { + if (valueTypeCase_ == 4) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Bytes type value, stored in CORD. It's also used for PROTO type value.
+     * 
+ * + * bytes bytes_value = 5; + * + * @return Whether the bytesValue field is set. + */ + public boolean hasBytesValue() { + return valueTypeCase_ == 5; + } + /** + * + * + *
+     * Bytes type value, stored in CORD. It's also used for PROTO type value.
+     * 
+ * + * bytes bytes_value = 5; + * + * @return The bytesValue. + */ + public com.google.protobuf.ByteString getBytesValue() { + if (valueTypeCase_ == 5) { + return (com.google.protobuf.ByteString) valueType_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+     * Bytes type value, stored in CORD. It's also used for PROTO type value.
+     * 
+ * + * bytes bytes_value = 5; + * + * @param value The bytesValue to set. + * @return This builder for chaining. + */ + public Builder setBytesValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + valueTypeCase_ = 5; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Bytes type value, stored in CORD. It's also used for PROTO type value.
+     * 
+ * + * bytes bytes_value = 5; + * + * @return This builder for chaining. + */ + public Builder clearBytesValue() { + if (valueTypeCase_ == 5) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String type value, stored in CORD.
+     * 
+ * + * string string_value = 6; + * + * @return Whether the stringValue field is set. + */ + @java.lang.Override + public boolean hasStringValue() { + return valueTypeCase_ == 6; + } + /** + * + * + *
+     * String type value, stored in CORD.
+     * 
+ * + * string string_value = 6; + * + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 6) { + ref = valueType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueTypeCase_ == 6) { + valueType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * String type value, stored in CORD.
+     * 
+ * + * string string_value = 6; + * + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (valueTypeCase_ == 6) { + ref = valueType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueTypeCase_ == 6) { + valueType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * String type value, stored in CORD.
+     * 
+ * + * string string_value = 6; + * + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueTypeCase_ = 6; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * String type value, stored in CORD.
+     * 
+ * + * string string_value = 6; + * + * @return This builder for chaining. + */ + public Builder clearStringValue() { + if (valueTypeCase_ == 6) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * String type value, stored in CORD.
+     * 
+ * + * string string_value = 6; + * + * @param value The bytes for stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueTypeCase_ = 6; + valueType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + structValueBuilder_; + /** + * + * + *
+     * Struct type value. It contains a ValueList representing the values in
+     * this struct.
+     * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + * + * @return Whether the structValue field is set. + */ + @java.lang.Override + public boolean hasStructValue() { + return valueTypeCase_ == 7; + } + /** + * + * + *
+     * Struct type value. It contains a ValueList representing the values in
+     * this struct.
+     * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + * + * @return The structValue. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueList getStructValue() { + if (structValueBuilder_ == null) { + if (valueTypeCase_ == 7) { + return (com.google.spanner.executor.v1.ValueList) valueType_; + } + return com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } else { + if (valueTypeCase_ == 7) { + return structValueBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } + } + /** + * + * + *
+     * Struct type value. It contains a ValueList representing the values in
+     * this struct.
+     * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + */ + public Builder setStructValue(com.google.spanner.executor.v1.ValueList value) { + if (structValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + structValueBuilder_.setMessage(value); + } + valueTypeCase_ = 7; + return this; + } + /** + * + * + *
+     * Struct type value. It contains a ValueList representing the values in
+     * this struct.
+     * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + */ + public Builder setStructValue( + com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (structValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + structValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 7; + return this; + } + /** + * + * + *
+     * Struct type value. It contains a ValueList representing the values in
+     * this struct.
+     * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + */ + public Builder mergeStructValue(com.google.spanner.executor.v1.ValueList value) { + if (structValueBuilder_ == null) { + if (valueTypeCase_ == 7 + && valueType_ != com.google.spanner.executor.v1.ValueList.getDefaultInstance()) { + valueType_ = + com.google.spanner.executor.v1.ValueList.newBuilder( + (com.google.spanner.executor.v1.ValueList) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 7) { + structValueBuilder_.mergeFrom(value); + } else { + structValueBuilder_.setMessage(value); + } + } + valueTypeCase_ = 7; + return this; + } + /** + * + * + *
+     * Struct type value. It contains a ValueList representing the values in
+     * this struct.
+     * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + */ + public Builder clearStructValue() { + if (structValueBuilder_ == null) { + if (valueTypeCase_ == 7) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 7) { + valueTypeCase_ = 0; + valueType_ = null; + } + structValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Struct type value. It contains a ValueList representing the values in
+     * this struct.
+     * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + */ + public com.google.spanner.executor.v1.ValueList.Builder getStructValueBuilder() { + return getStructValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Struct type value. It contains a ValueList representing the values in
+     * this struct.
+     * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueListOrBuilder getStructValueOrBuilder() { + if ((valueTypeCase_ == 7) && (structValueBuilder_ != null)) { + return structValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 7) { + return (com.google.spanner.executor.v1.ValueList) valueType_; + } + return com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } + } + /** + * + * + *
+     * Struct type value. It contains a ValueList representing the values in
+     * this struct.
+     * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + getStructValueFieldBuilder() { + if (structValueBuilder_ == null) { + if (!(valueTypeCase_ == 7)) { + valueType_ = com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } + structValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder>( + (com.google.spanner.executor.v1.ValueList) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 7; + onChanged(); + return structValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + timestampValueBuilder_; + /** + * + * + *
+     * Timestamp type value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + * + * @return Whether the timestampValue field is set. + */ + @java.lang.Override + public boolean hasTimestampValue() { + return valueTypeCase_ == 8; + } + /** + * + * + *
+     * Timestamp type value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + * + * @return The timestampValue. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestampValue() { + if (timestampValueBuilder_ == null) { + if (valueTypeCase_ == 8) { + return (com.google.protobuf.Timestamp) valueType_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (valueTypeCase_ == 8) { + return timestampValueBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * Timestamp type value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + */ + public Builder setTimestampValue(com.google.protobuf.Timestamp value) { + if (timestampValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + timestampValueBuilder_.setMessage(value); + } + valueTypeCase_ = 8; + return this; + } + /** + * + * + *
+     * Timestamp type value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + */ + public Builder setTimestampValue(com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + timestampValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 8; + return this; + } + /** + * + * + *
+     * Timestamp type value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + */ + public Builder mergeTimestampValue(com.google.protobuf.Timestamp value) { + if (timestampValueBuilder_ == null) { + if (valueTypeCase_ == 8 + && valueType_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + valueType_ = + com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 8) { + timestampValueBuilder_.mergeFrom(value); + } else { + timestampValueBuilder_.setMessage(value); + } + } + valueTypeCase_ = 8; + return this; + } + /** + * + * + *
+     * Timestamp type value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + */ + public Builder clearTimestampValue() { + if (timestampValueBuilder_ == null) { + if (valueTypeCase_ == 8) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 8) { + valueTypeCase_ = 0; + valueType_ = null; + } + timestampValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Timestamp type value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + */ + public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { + return getTimestampValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Timestamp type value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { + if ((valueTypeCase_ == 8) && (timestampValueBuilder_ != null)) { + return timestampValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 8) { + return (com.google.protobuf.Timestamp) valueType_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * Timestamp type value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTimestampValueFieldBuilder() { + if (timestampValueBuilder_ == null) { + if (!(valueTypeCase_ == 8)) { + valueType_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + timestampValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) valueType_, getParentForChildren(), isClean()); + valueType_ = null; + } + valueTypeCase_ = 8; + onChanged(); + return timestampValueBuilder_; + } + + /** + * + * + *
+     * Date type value. Date is specified as a number of days since Unix epoch.
+     * 
+ * + * int32 date_days_value = 9; + * + * @return Whether the dateDaysValue field is set. + */ + public boolean hasDateDaysValue() { + return valueTypeCase_ == 9; + } + /** + * + * + *
+     * Date type value. Date is specified as a number of days since Unix epoch.
+     * 
+ * + * int32 date_days_value = 9; + * + * @return The dateDaysValue. + */ + public int getDateDaysValue() { + if (valueTypeCase_ == 9) { + return (java.lang.Integer) valueType_; + } + return 0; + } + /** + * + * + *
+     * Date type value. Date is specified as a number of days since Unix epoch.
+     * 
+ * + * int32 date_days_value = 9; + * + * @param value The dateDaysValue to set. + * @return This builder for chaining. + */ + public Builder setDateDaysValue(int value) { + + valueTypeCase_ = 9; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Date type value. Date is specified as a number of days since Unix epoch.
+     * 
+ * + * int32 date_days_value = 9; + * + * @return This builder for chaining. + */ + public Builder clearDateDaysValue() { + if (valueTypeCase_ == 9) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * If set, holds the sentinel value for the transaction CommitTimestamp.
+     * 
+ * + * bool is_commit_timestamp = 10; + * + * @return Whether the isCommitTimestamp field is set. + */ + public boolean hasIsCommitTimestamp() { + return valueTypeCase_ == 10; + } + /** + * + * + *
+     * If set, holds the sentinel value for the transaction CommitTimestamp.
+     * 
+ * + * bool is_commit_timestamp = 10; + * + * @return The isCommitTimestamp. + */ + public boolean getIsCommitTimestamp() { + if (valueTypeCase_ == 10) { + return (java.lang.Boolean) valueType_; + } + return false; + } + /** + * + * + *
+     * If set, holds the sentinel value for the transaction CommitTimestamp.
+     * 
+ * + * bool is_commit_timestamp = 10; + * + * @param value The isCommitTimestamp to set. + * @return This builder for chaining. + */ + public Builder setIsCommitTimestamp(boolean value) { + + valueTypeCase_ = 10; + valueType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, holds the sentinel value for the transaction CommitTimestamp.
+     * 
+ * + * bool is_commit_timestamp = 10; + * + * @return This builder for chaining. + */ + public Builder clearIsCommitTimestamp() { + if (valueTypeCase_ == 10) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + arrayValueBuilder_; + /** + * + * + *
+     * Array type value. The underlying Valuelist should have values that have
+     * the same type.
+     * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + * + * @return Whether the arrayValue field is set. + */ + @java.lang.Override + public boolean hasArrayValue() { + return valueTypeCase_ == 11; + } + /** + * + * + *
+     * Array type value. The underlying Valuelist should have values that have
+     * the same type.
+     * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + * + * @return The arrayValue. + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueList getArrayValue() { + if (arrayValueBuilder_ == null) { + if (valueTypeCase_ == 11) { + return (com.google.spanner.executor.v1.ValueList) valueType_; + } + return com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } else { + if (valueTypeCase_ == 11) { + return arrayValueBuilder_.getMessage(); + } + return com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } + } + /** + * + * + *
+     * Array type value. The underlying Valuelist should have values that have
+     * the same type.
+     * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + */ + public Builder setArrayValue(com.google.spanner.executor.v1.ValueList value) { + if (arrayValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + arrayValueBuilder_.setMessage(value); + } + valueTypeCase_ = 11; + return this; + } + /** + * + * + *
+     * Array type value. The underlying Valuelist should have values that have
+     * the same type.
+     * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + */ + public Builder setArrayValue(com.google.spanner.executor.v1.ValueList.Builder builderForValue) { + if (arrayValueBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + arrayValueBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 11; + return this; + } + /** + * + * + *
+     * Array type value. The underlying Valuelist should have values that have
+     * the same type.
+     * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + */ + public Builder mergeArrayValue(com.google.spanner.executor.v1.ValueList value) { + if (arrayValueBuilder_ == null) { + if (valueTypeCase_ == 11 + && valueType_ != com.google.spanner.executor.v1.ValueList.getDefaultInstance()) { + valueType_ = + com.google.spanner.executor.v1.ValueList.newBuilder( + (com.google.spanner.executor.v1.ValueList) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 11) { + arrayValueBuilder_.mergeFrom(value); + } else { + arrayValueBuilder_.setMessage(value); + } + } + valueTypeCase_ = 11; + return this; + } + /** + * + * + *
+     * Array type value. The underlying Valuelist should have values that have
+     * the same type.
+     * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + */ + public Builder clearArrayValue() { + if (arrayValueBuilder_ == null) { + if (valueTypeCase_ == 11) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 11) { + valueTypeCase_ = 0; + valueType_ = null; + } + arrayValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Array type value. The underlying Valuelist should have values that have
+     * the same type.
+     * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + */ + public com.google.spanner.executor.v1.ValueList.Builder getArrayValueBuilder() { + return getArrayValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Array type value. The underlying Valuelist should have values that have
+     * the same type.
+     * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueListOrBuilder getArrayValueOrBuilder() { + if ((valueTypeCase_ == 11) && (arrayValueBuilder_ != null)) { + return arrayValueBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 11) { + return (com.google.spanner.executor.v1.ValueList) valueType_; + } + return com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } + } + /** + * + * + *
+     * Array type value. The underlying Valuelist should have values that have
+     * the same type.
+     * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder> + getArrayValueFieldBuilder() { + if (arrayValueBuilder_ == null) { + if (!(valueTypeCase_ == 11)) { + valueType_ = com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } + arrayValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.ValueList, + com.google.spanner.executor.v1.ValueList.Builder, + com.google.spanner.executor.v1.ValueListOrBuilder>( + (com.google.spanner.executor.v1.ValueList) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 11; + onChanged(); + return arrayValueBuilder_; + } + + private com.google.spanner.v1.Type arrayType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder> + arrayTypeBuilder_; + /** + * + * + *
+     * Type of array element. Only set if value is an array.
+     * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + * + * @return Whether the arrayType field is set. + */ + public boolean hasArrayType() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Type of array element. Only set if value is an array.
+     * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + * + * @return The arrayType. + */ + public com.google.spanner.v1.Type getArrayType() { + if (arrayTypeBuilder_ == null) { + return arrayType_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : arrayType_; + } else { + return arrayTypeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Type of array element. Only set if value is an array.
+     * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + */ + public Builder setArrayType(com.google.spanner.v1.Type value) { + if (arrayTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + arrayType_ = value; + } else { + arrayTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of array element. Only set if value is an array.
+     * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + */ + public Builder setArrayType(com.google.spanner.v1.Type.Builder builderForValue) { + if (arrayTypeBuilder_ == null) { + arrayType_ = builderForValue.build(); + } else { + arrayTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of array element. Only set if value is an array.
+     * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + */ + public Builder mergeArrayType(com.google.spanner.v1.Type value) { + if (arrayTypeBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && arrayType_ != null + && arrayType_ != com.google.spanner.v1.Type.getDefaultInstance()) { + getArrayTypeBuilder().mergeFrom(value); + } else { + arrayType_ = value; + } + } else { + arrayTypeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of array element. Only set if value is an array.
+     * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + */ + public Builder clearArrayType() { + bitField0_ = (bitField0_ & ~0x00000800); + arrayType_ = null; + if (arrayTypeBuilder_ != null) { + arrayTypeBuilder_.dispose(); + arrayTypeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Type of array element. Only set if value is an array.
+     * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + */ + public com.google.spanner.v1.Type.Builder getArrayTypeBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getArrayTypeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Type of array element. Only set if value is an array.
+     * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + */ + public com.google.spanner.v1.TypeOrBuilder getArrayTypeOrBuilder() { + if (arrayTypeBuilder_ != null) { + return arrayTypeBuilder_.getMessageOrBuilder(); + } else { + return arrayType_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : arrayType_; + } + } + /** + * + * + *
+     * Type of array element. Only set if value is an array.
+     * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder> + getArrayTypeFieldBuilder() { + if (arrayTypeBuilder_ == null) { + arrayTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.v1.Type, + com.google.spanner.v1.Type.Builder, + com.google.spanner.v1.TypeOrBuilder>( + getArrayType(), getParentForChildren(), isClean()); + arrayType_ = null; + } + return arrayTypeBuilder_; + } + + @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.executor.v1.Value) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.Value) + private static final com.google.spanner.executor.v1.Value DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.Value(); + } + + public static com.google.spanner.executor.v1.Value getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Value 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.executor.v1.Value getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ValueList.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ValueList.java new file mode 100644 index 00000000000..2ff09046383 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ValueList.java @@ -0,0 +1,931 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * List of values.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ValueList} + */ +public final class ValueList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.ValueList) + ValueListOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValueList.newBuilder() to construct. + private ValueList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ValueList() { + value_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ValueList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ValueList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ValueList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ValueList.class, + com.google.spanner.executor.v1.ValueList.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List value_; + /** + * + * + *
+   * Values contained in this ValueList.
+   * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + @java.lang.Override + public java.util.List getValueList() { + return value_; + } + /** + * + * + *
+   * Values contained in this ValueList.
+   * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + @java.lang.Override + public java.util.List + getValueOrBuilderList() { + return value_; + } + /** + * + * + *
+   * Values contained in this ValueList.
+   * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + @java.lang.Override + public int getValueCount() { + return value_.size(); + } + /** + * + * + *
+   * Values contained in this ValueList.
+   * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.Value getValue(int index) { + return value_.get(index); + } + /** + * + * + *
+   * Values contained in this ValueList.
+   * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.ValueOrBuilder getValueOrBuilder(int index) { + return value_.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 < value_.size(); i++) { + output.writeMessage(1, value_.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 < value_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, value_.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.executor.v1.ValueList)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.ValueList other = (com.google.spanner.executor.v1.ValueList) obj; + + if (!getValueList().equals(other.getValueList())) 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 (getValueCount() > 0) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValueList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.ValueList parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ValueList 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.executor.v1.ValueList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ValueList 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.executor.v1.ValueList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.ValueList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.ValueList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ValueList 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.executor.v1.ValueList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ValueList 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.executor.v1.ValueList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.ValueList 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.executor.v1.ValueList 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; + } + /** + * + * + *
+   * List of values.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.ValueList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.ValueList) + com.google.spanner.executor.v1.ValueListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ValueList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ValueList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.ValueList.class, + com.google.spanner.executor.v1.ValueList.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.ValueList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valueBuilder_ == null) { + value_ = java.util.Collections.emptyList(); + } else { + value_ = null; + valueBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_ValueList_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ValueList getDefaultInstanceForType() { + return com.google.spanner.executor.v1.ValueList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.ValueList build() { + com.google.spanner.executor.v1.ValueList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.ValueList buildPartial() { + com.google.spanner.executor.v1.ValueList result = + new com.google.spanner.executor.v1.ValueList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.spanner.executor.v1.ValueList result) { + if (valueBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + value_ = java.util.Collections.unmodifiableList(value_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.value_ = value_; + } else { + result.value_ = valueBuilder_.build(); + } + } + + private void buildPartial0(com.google.spanner.executor.v1.ValueList 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.executor.v1.ValueList) { + return mergeFrom((com.google.spanner.executor.v1.ValueList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.ValueList other) { + if (other == com.google.spanner.executor.v1.ValueList.getDefaultInstance()) return this; + if (valueBuilder_ == null) { + if (!other.value_.isEmpty()) { + if (value_.isEmpty()) { + value_ = other.value_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValueIsMutable(); + value_.addAll(other.value_); + } + onChanged(); + } + } else { + if (!other.value_.isEmpty()) { + if (valueBuilder_.isEmpty()) { + valueBuilder_.dispose(); + valueBuilder_ = null; + value_ = other.value_; + bitField0_ = (bitField0_ & ~0x00000001); + valueBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValueFieldBuilder() + : null; + } else { + valueBuilder_.addAllMessages(other.value_); + } + } + } + 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.executor.v1.Value m = + input.readMessage( + com.google.spanner.executor.v1.Value.parser(), extensionRegistry); + if (valueBuilder_ == null) { + ensureValueIsMutable(); + value_.add(m); + } else { + valueBuilder_.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 value_ = + java.util.Collections.emptyList(); + + private void ensureValueIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + value_ = new java.util.ArrayList(value_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.Value, + com.google.spanner.executor.v1.Value.Builder, + com.google.spanner.executor.v1.ValueOrBuilder> + valueBuilder_; + + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public java.util.List getValueList() { + if (valueBuilder_ == null) { + return java.util.Collections.unmodifiableList(value_); + } else { + return valueBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public int getValueCount() { + if (valueBuilder_ == null) { + return value_.size(); + } else { + return valueBuilder_.getCount(); + } + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public com.google.spanner.executor.v1.Value getValue(int index) { + if (valueBuilder_ == null) { + return value_.get(index); + } else { + return valueBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public Builder setValue(int index, com.google.spanner.executor.v1.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueIsMutable(); + value_.set(index, value); + onChanged(); + } else { + valueBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public Builder setValue( + int index, com.google.spanner.executor.v1.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + ensureValueIsMutable(); + value_.set(index, builderForValue.build()); + onChanged(); + } else { + valueBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public Builder addValue(com.google.spanner.executor.v1.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueIsMutable(); + value_.add(value); + onChanged(); + } else { + valueBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public Builder addValue(int index, com.google.spanner.executor.v1.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueIsMutable(); + value_.add(index, value); + onChanged(); + } else { + valueBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public Builder addValue(com.google.spanner.executor.v1.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + ensureValueIsMutable(); + value_.add(builderForValue.build()); + onChanged(); + } else { + valueBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public Builder addValue( + int index, com.google.spanner.executor.v1.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + ensureValueIsMutable(); + value_.add(index, builderForValue.build()); + onChanged(); + } else { + valueBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public Builder addAllValue( + java.lang.Iterable values) { + if (valueBuilder_ == null) { + ensureValueIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, value_); + onChanged(); + } else { + valueBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public Builder removeValue(int index) { + if (valueBuilder_ == null) { + ensureValueIsMutable(); + value_.remove(index); + onChanged(); + } else { + valueBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public com.google.spanner.executor.v1.Value.Builder getValueBuilder(int index) { + return getValueFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public com.google.spanner.executor.v1.ValueOrBuilder getValueOrBuilder(int index) { + if (valueBuilder_ == null) { + return value_.get(index); + } else { + return valueBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public java.util.List + getValueOrBuilderList() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(value_); + } + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public com.google.spanner.executor.v1.Value.Builder addValueBuilder() { + return getValueFieldBuilder() + .addBuilder(com.google.spanner.executor.v1.Value.getDefaultInstance()); + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public com.google.spanner.executor.v1.Value.Builder addValueBuilder(int index) { + return getValueFieldBuilder() + .addBuilder(index, com.google.spanner.executor.v1.Value.getDefaultInstance()); + } + /** + * + * + *
+     * Values contained in this ValueList.
+     * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + public java.util.List getValueBuilderList() { + return getValueFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.Value, + com.google.spanner.executor.v1.Value.Builder, + com.google.spanner.executor.v1.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.executor.v1.Value, + com.google.spanner.executor.v1.Value.Builder, + com.google.spanner.executor.v1.ValueOrBuilder>( + value_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + value_ = null; + } + return valueBuilder_; + } + + @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.executor.v1.ValueList) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.ValueList) + private static final com.google.spanner.executor.v1.ValueList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.ValueList(); + } + + public static com.google.spanner.executor.v1.ValueList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValueList 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.executor.v1.ValueList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ValueListOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ValueListOrBuilder.java new file mode 100644 index 00000000000..5578961a158 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ValueListOrBuilder.java @@ -0,0 +1,76 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ValueListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.ValueList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Values contained in this ValueList.
+   * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + java.util.List getValueList(); + /** + * + * + *
+   * Values contained in this ValueList.
+   * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + com.google.spanner.executor.v1.Value getValue(int index); + /** + * + * + *
+   * Values contained in this ValueList.
+   * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + int getValueCount(); + /** + * + * + *
+   * Values contained in this ValueList.
+   * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + java.util.List getValueOrBuilderList(); + /** + * + * + *
+   * Values contained in this ValueList.
+   * 
+ * + * repeated .google.spanner.executor.v1.Value value = 1; + */ + com.google.spanner.executor.v1.ValueOrBuilder getValueOrBuilder(int index); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ValueOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ValueOrBuilder.java new file mode 100644 index 00000000000..f92f72e9957 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/ValueOrBuilder.java @@ -0,0 +1,389 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface ValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.Value) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If is_null is set, then this value is null.
+   * 
+ * + * bool is_null = 1; + * + * @return Whether the isNull field is set. + */ + boolean hasIsNull(); + /** + * + * + *
+   * If is_null is set, then this value is null.
+   * 
+ * + * bool is_null = 1; + * + * @return The isNull. + */ + boolean getIsNull(); + + /** + * + * + *
+   * Int type value. It's used for all integer number types, like int32 and
+   * int64.
+   * 
+ * + * int64 int_value = 2; + * + * @return Whether the intValue field is set. + */ + boolean hasIntValue(); + /** + * + * + *
+   * Int type value. It's used for all integer number types, like int32 and
+   * int64.
+   * 
+ * + * int64 int_value = 2; + * + * @return The intValue. + */ + long getIntValue(); + + /** + * + * + *
+   * Bool type value.
+   * 
+ * + * bool bool_value = 3; + * + * @return Whether the boolValue field is set. + */ + boolean hasBoolValue(); + /** + * + * + *
+   * Bool type value.
+   * 
+ * + * bool bool_value = 3; + * + * @return The boolValue. + */ + boolean getBoolValue(); + + /** + * + * + *
+   * Double type value. It's used for all float point types, like float and
+   * double.
+   * 
+ * + * double double_value = 4; + * + * @return Whether the doubleValue field is set. + */ + boolean hasDoubleValue(); + /** + * + * + *
+   * Double type value. It's used for all float point types, like float and
+   * double.
+   * 
+ * + * double double_value = 4; + * + * @return The doubleValue. + */ + double getDoubleValue(); + + /** + * + * + *
+   * Bytes type value, stored in CORD. It's also used for PROTO type value.
+   * 
+ * + * bytes bytes_value = 5; + * + * @return Whether the bytesValue field is set. + */ + boolean hasBytesValue(); + /** + * + * + *
+   * Bytes type value, stored in CORD. It's also used for PROTO type value.
+   * 
+ * + * bytes bytes_value = 5; + * + * @return The bytesValue. + */ + com.google.protobuf.ByteString getBytesValue(); + + /** + * + * + *
+   * String type value, stored in CORD.
+   * 
+ * + * string string_value = 6; + * + * @return Whether the stringValue field is set. + */ + boolean hasStringValue(); + /** + * + * + *
+   * String type value, stored in CORD.
+   * 
+ * + * string string_value = 6; + * + * @return The stringValue. + */ + java.lang.String getStringValue(); + /** + * + * + *
+   * String type value, stored in CORD.
+   * 
+ * + * string string_value = 6; + * + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString getStringValueBytes(); + + /** + * + * + *
+   * Struct type value. It contains a ValueList representing the values in
+   * this struct.
+   * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + * + * @return Whether the structValue field is set. + */ + boolean hasStructValue(); + /** + * + * + *
+   * Struct type value. It contains a ValueList representing the values in
+   * this struct.
+   * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + * + * @return The structValue. + */ + com.google.spanner.executor.v1.ValueList getStructValue(); + /** + * + * + *
+   * Struct type value. It contains a ValueList representing the values in
+   * this struct.
+   * 
+ * + * .google.spanner.executor.v1.ValueList struct_value = 7; + */ + com.google.spanner.executor.v1.ValueListOrBuilder getStructValueOrBuilder(); + + /** + * + * + *
+   * Timestamp type value.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + * + * @return Whether the timestampValue field is set. + */ + boolean hasTimestampValue(); + /** + * + * + *
+   * Timestamp type value.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + * + * @return The timestampValue. + */ + com.google.protobuf.Timestamp getTimestampValue(); + /** + * + * + *
+   * Timestamp type value.
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 8; + */ + com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder(); + + /** + * + * + *
+   * Date type value. Date is specified as a number of days since Unix epoch.
+   * 
+ * + * int32 date_days_value = 9; + * + * @return Whether the dateDaysValue field is set. + */ + boolean hasDateDaysValue(); + /** + * + * + *
+   * Date type value. Date is specified as a number of days since Unix epoch.
+   * 
+ * + * int32 date_days_value = 9; + * + * @return The dateDaysValue. + */ + int getDateDaysValue(); + + /** + * + * + *
+   * If set, holds the sentinel value for the transaction CommitTimestamp.
+   * 
+ * + * bool is_commit_timestamp = 10; + * + * @return Whether the isCommitTimestamp field is set. + */ + boolean hasIsCommitTimestamp(); + /** + * + * + *
+   * If set, holds the sentinel value for the transaction CommitTimestamp.
+   * 
+ * + * bool is_commit_timestamp = 10; + * + * @return The isCommitTimestamp. + */ + boolean getIsCommitTimestamp(); + + /** + * + * + *
+   * Array type value. The underlying Valuelist should have values that have
+   * the same type.
+   * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + * + * @return Whether the arrayValue field is set. + */ + boolean hasArrayValue(); + /** + * + * + *
+   * Array type value. The underlying Valuelist should have values that have
+   * the same type.
+   * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + * + * @return The arrayValue. + */ + com.google.spanner.executor.v1.ValueList getArrayValue(); + /** + * + * + *
+   * Array type value. The underlying Valuelist should have values that have
+   * the same type.
+   * 
+ * + * .google.spanner.executor.v1.ValueList array_value = 11; + */ + com.google.spanner.executor.v1.ValueListOrBuilder getArrayValueOrBuilder(); + + /** + * + * + *
+   * Type of array element. Only set if value is an array.
+   * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + * + * @return Whether the arrayType field is set. + */ + boolean hasArrayType(); + /** + * + * + *
+   * Type of array element. Only set if value is an array.
+   * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + * + * @return The arrayType. + */ + com.google.spanner.v1.Type getArrayType(); + /** + * + * + *
+   * Type of array element. Only set if value is an array.
+   * 
+ * + * optional .google.spanner.v1.Type array_type = 12; + */ + com.google.spanner.v1.TypeOrBuilder getArrayTypeOrBuilder(); + + com.google.spanner.executor.v1.Value.ValueTypeCase getValueTypeCase(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/WriteMutationsAction.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/WriteMutationsAction.java new file mode 100644 index 00000000000..811fec8a11e --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/WriteMutationsAction.java @@ -0,0 +1,708 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +/** + * + * + *
+ * WriteMutationAction defines an action of flushing the mutation so they
+ * are visible to subsequent operations in the transaction.
+ * 
+ * + * Protobuf type {@code google.spanner.executor.v1.WriteMutationsAction} + */ +public final class WriteMutationsAction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.executor.v1.WriteMutationsAction) + WriteMutationsActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use WriteMutationsAction.newBuilder() to construct. + private WriteMutationsAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WriteMutationsAction() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WriteMutationsAction(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_WriteMutationsAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_WriteMutationsAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.WriteMutationsAction.class, + com.google.spanner.executor.v1.WriteMutationsAction.Builder.class); + } + + public static final int MUTATION_FIELD_NUMBER = 1; + private com.google.spanner.executor.v1.MutationAction mutation_; + /** + * + * + *
+   * The mutation to write.
+   * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + * + * @return Whether the mutation field is set. + */ + @java.lang.Override + public boolean hasMutation() { + return mutation_ != null; + } + /** + * + * + *
+   * The mutation to write.
+   * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + * + * @return The mutation. + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationAction getMutation() { + return mutation_ == null + ? com.google.spanner.executor.v1.MutationAction.getDefaultInstance() + : mutation_; + } + /** + * + * + *
+   * The mutation to write.
+   * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + */ + @java.lang.Override + public com.google.spanner.executor.v1.MutationActionOrBuilder getMutationOrBuilder() { + return mutation_ == null + ? com.google.spanner.executor.v1.MutationAction.getDefaultInstance() + : mutation_; + } + + 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 (mutation_ != null) { + output.writeMessage(1, getMutation()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mutation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMutation()); + } + 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.executor.v1.WriteMutationsAction)) { + return super.equals(obj); + } + com.google.spanner.executor.v1.WriteMutationsAction other = + (com.google.spanner.executor.v1.WriteMutationsAction) obj; + + if (hasMutation() != other.hasMutation()) return false; + if (hasMutation()) { + if (!getMutation().equals(other.getMutation())) 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 (hasMutation()) { + hash = (37 * hash) + MUTATION_FIELD_NUMBER; + hash = (53 * hash) + getMutation().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.executor.v1.WriteMutationsAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.WriteMutationsAction 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.executor.v1.WriteMutationsAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.WriteMutationsAction 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.executor.v1.WriteMutationsAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.executor.v1.WriteMutationsAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.executor.v1.WriteMutationsAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.WriteMutationsAction 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.executor.v1.WriteMutationsAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.WriteMutationsAction 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.executor.v1.WriteMutationsAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.executor.v1.WriteMutationsAction 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.executor.v1.WriteMutationsAction 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; + } + /** + * + * + *
+   * WriteMutationAction defines an action of flushing the mutation so they
+   * are visible to subsequent operations in the transaction.
+   * 
+ * + * Protobuf type {@code google.spanner.executor.v1.WriteMutationsAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.executor.v1.WriteMutationsAction) + com.google.spanner.executor.v1.WriteMutationsActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_WriteMutationsAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_WriteMutationsAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.executor.v1.WriteMutationsAction.class, + com.google.spanner.executor.v1.WriteMutationsAction.Builder.class); + } + + // Construct using com.google.spanner.executor.v1.WriteMutationsAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mutation_ = null; + if (mutationBuilder_ != null) { + mutationBuilder_.dispose(); + mutationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.executor.v1.CloudExecutorProto + .internal_static_google_spanner_executor_v1_WriteMutationsAction_descriptor; + } + + @java.lang.Override + public com.google.spanner.executor.v1.WriteMutationsAction getDefaultInstanceForType() { + return com.google.spanner.executor.v1.WriteMutationsAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.executor.v1.WriteMutationsAction build() { + com.google.spanner.executor.v1.WriteMutationsAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.executor.v1.WriteMutationsAction buildPartial() { + com.google.spanner.executor.v1.WriteMutationsAction result = + new com.google.spanner.executor.v1.WriteMutationsAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.executor.v1.WriteMutationsAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mutation_ = mutationBuilder_ == null ? mutation_ : mutationBuilder_.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.executor.v1.WriteMutationsAction) { + return mergeFrom((com.google.spanner.executor.v1.WriteMutationsAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.executor.v1.WriteMutationsAction other) { + if (other == com.google.spanner.executor.v1.WriteMutationsAction.getDefaultInstance()) + return this; + if (other.hasMutation()) { + mergeMutation(other.getMutation()); + } + 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: + { + input.readMessage(getMutationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + 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 com.google.spanner.executor.v1.MutationAction mutation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction, + com.google.spanner.executor.v1.MutationAction.Builder, + com.google.spanner.executor.v1.MutationActionOrBuilder> + mutationBuilder_; + /** + * + * + *
+     * The mutation to write.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + * + * @return Whether the mutation field is set. + */ + public boolean hasMutation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The mutation to write.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + * + * @return The mutation. + */ + public com.google.spanner.executor.v1.MutationAction getMutation() { + if (mutationBuilder_ == null) { + return mutation_ == null + ? com.google.spanner.executor.v1.MutationAction.getDefaultInstance() + : mutation_; + } else { + return mutationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The mutation to write.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + */ + public Builder setMutation(com.google.spanner.executor.v1.MutationAction value) { + if (mutationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mutation_ = value; + } else { + mutationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The mutation to write.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + */ + public Builder setMutation( + com.google.spanner.executor.v1.MutationAction.Builder builderForValue) { + if (mutationBuilder_ == null) { + mutation_ = builderForValue.build(); + } else { + mutationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The mutation to write.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + */ + public Builder mergeMutation(com.google.spanner.executor.v1.MutationAction value) { + if (mutationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && mutation_ != null + && mutation_ != com.google.spanner.executor.v1.MutationAction.getDefaultInstance()) { + getMutationBuilder().mergeFrom(value); + } else { + mutation_ = value; + } + } else { + mutationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The mutation to write.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + */ + public Builder clearMutation() { + bitField0_ = (bitField0_ & ~0x00000001); + mutation_ = null; + if (mutationBuilder_ != null) { + mutationBuilder_.dispose(); + mutationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The mutation to write.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + */ + public com.google.spanner.executor.v1.MutationAction.Builder getMutationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getMutationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The mutation to write.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + */ + public com.google.spanner.executor.v1.MutationActionOrBuilder getMutationOrBuilder() { + if (mutationBuilder_ != null) { + return mutationBuilder_.getMessageOrBuilder(); + } else { + return mutation_ == null + ? com.google.spanner.executor.v1.MutationAction.getDefaultInstance() + : mutation_; + } + } + /** + * + * + *
+     * The mutation to write.
+     * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction, + com.google.spanner.executor.v1.MutationAction.Builder, + com.google.spanner.executor.v1.MutationActionOrBuilder> + getMutationFieldBuilder() { + if (mutationBuilder_ == null) { + mutationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.executor.v1.MutationAction, + com.google.spanner.executor.v1.MutationAction.Builder, + com.google.spanner.executor.v1.MutationActionOrBuilder>( + getMutation(), getParentForChildren(), isClean()); + mutation_ = null; + } + return mutationBuilder_; + } + + @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.executor.v1.WriteMutationsAction) + } + + // @@protoc_insertion_point(class_scope:google.spanner.executor.v1.WriteMutationsAction) + private static final com.google.spanner.executor.v1.WriteMutationsAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.executor.v1.WriteMutationsAction(); + } + + public static com.google.spanner.executor.v1.WriteMutationsAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WriteMutationsAction 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.executor.v1.WriteMutationsAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/WriteMutationsActionOrBuilder.java b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/WriteMutationsActionOrBuilder.java new file mode 100644 index 00000000000..3a412678808 --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/java/com/google/spanner/executor/v1/WriteMutationsActionOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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/executor/v1/cloud_executor.proto + +package com.google.spanner.executor.v1; + +public interface WriteMutationsActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.executor.v1.WriteMutationsAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The mutation to write.
+   * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + * + * @return Whether the mutation field is set. + */ + boolean hasMutation(); + /** + * + * + *
+   * The mutation to write.
+   * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + * + * @return The mutation. + */ + com.google.spanner.executor.v1.MutationAction getMutation(); + /** + * + * + *
+   * The mutation to write.
+   * 
+ * + * .google.spanner.executor.v1.MutationAction mutation = 1; + */ + com.google.spanner.executor.v1.MutationActionOrBuilder getMutationOrBuilder(); +} diff --git a/proto-google-cloud-spanner-executor-v1/src/main/proto/google/spanner/executor/v1/cloud_executor.proto b/proto-google-cloud-spanner-executor-v1/src/main/proto/google/spanner/executor/v1/cloud_executor.proto new file mode 100644 index 00000000000..56332dc0e8d --- /dev/null +++ b/proto-google-cloud-spanner-executor-v1/src/main/proto/google/spanner/executor/v1/cloud_executor.proto @@ -0,0 +1,1483 @@ +// 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. + +syntax = "proto3"; + +package google.spanner.executor.v1; + +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/spanner/admin/database/v1/backup.proto"; +import "google/spanner/admin/database/v1/common.proto"; +import "google/spanner/admin/database/v1/spanner_database_admin.proto"; +import "google/spanner/admin/instance/v1/spanner_instance_admin.proto"; +import "google/spanner/v1/spanner.proto"; +import "google/spanner/v1/type.proto"; + +option go_package = "cloud.google.com/go/spanner/executor/apiv1/executorpb;executorpb"; +option java_multiple_files = true; +option java_outer_classname = "CloudExecutorProto"; +option java_package = "com.google.spanner.executor.v1"; + +// Service that executes SpannerActions asynchronously. +service SpannerExecutorProxy { + option (google.api.default_host) = "spanner-cloud-executor.googleapis.com"; + + // ExecuteActionAsync is a streaming call that starts executing a new Spanner + // action. + // + // For each request, the server will reply with one or more responses, but + // only the last response will contain status in the outcome. + // + // Responses can be matched to requests by action_id. It is allowed to have + // multiple actions in flight--in that case, actions are be executed in + // parallel. + rpc ExecuteActionAsync(stream SpannerAsyncActionRequest) + returns (stream SpannerAsyncActionResponse) {} +} + +// Request to executor service that start a new Spanner action. +message SpannerAsyncActionRequest { + // Action id to uniquely identify this action request. + int32 action_id = 1; + + // The actual SpannerAction to perform. + SpannerAction action = 2; +} + +// Response from executor service. +message SpannerAsyncActionResponse { + // Action id corresponds to the request. + int32 action_id = 1; + + // If action results are split into multiple responses, only the last response + // can and should contain status. + SpannerActionOutcome outcome = 2; +} + +// SpannerAction defines a primitive action that can be performed against +// Spanner, such as begin or commit a transaction, or perform a read or +// mutation. +message SpannerAction { + // Database against which to perform action. + // In a context where a series of actions take place, an action may omit + // database path if it applies to the same database as the previous action. + string database_path = 1; + + // Action represents a spanner action kind, there will only be one action kind + // per SpannerAction. + oneof action { + // Action to start a transaction. + StartTransactionAction start = 10; + + // Action to finish a transaction. + FinishTransactionAction finish = 11; + + // Action to do a normal read. + ReadAction read = 20; + + // Action to do a query. + QueryAction query = 21; + + // Action to buffer a mutation. + MutationAction mutation = 22; + + // Action to a DML. + DmlAction dml = 23; + + // Action to a batch DML. + BatchDmlAction batch_dml = 24; + + // Action to write a mutation. + WriteMutationsAction write = 25; + + // Action to a partitioned update. + PartitionedUpdateAction partitioned_update = 27; + + // Action that contains any administrative operation, like database, + // instance manipulation. + AdminAction admin = 30; + + // Action to start a batch transaction. + StartBatchTransactionAction start_batch_txn = 40; + + // Action to close a batch transaction. + CloseBatchTransactionAction close_batch_txn = 41; + + // Action to generate database partitions for batch read. + GenerateDbPartitionsForReadAction generate_db_partitions_read = 42; + + // Action to generate database partitions for batch query. + GenerateDbPartitionsForQueryAction generate_db_partitions_query = 43; + + // Action to execute batch actions on generated partitions. + ExecutePartitionAction execute_partition = 44; + + // Action to execute change stream query. + ExecuteChangeStreamQuery execute_change_stream_query = 50; + } +} + +// A single read request. +message ReadAction { + // The table to read at. + string table = 1; + + // The index to read at if it's an index read. + optional string index = 2; + + // List of columns must begin with the key columns used for the read. + repeated string column = 3; + + // Keys for performing this read. + KeySet keys = 4; + + // Limit on number of rows to read. If set, must be positive. + int32 limit = 5; +} + +// A SQL query request. +message QueryAction { + // Parameter that bind to placeholders in the SQL string + message Parameter { + // Name of the parameter (with no leading @). + string name = 1; + + // Type of the parameter. + google.spanner.v1.Type type = 2; + + // Value of the parameter. + Value value = 3; + } + + // The SQL string. + string sql = 1; + + // Parameters for the SQL string. + repeated Parameter params = 2; +} + +// A single DML statement. +message DmlAction { + // DML statement. + QueryAction update = 1; + + // Whether to autocommit the transaction after executing the DML statement, + // if the Executor supports autocommit. + optional bool autocommit_if_supported = 2; +} + +// Batch of DML statements invoked using batched execution. +message BatchDmlAction { + // DML statements. + repeated QueryAction updates = 1; +} + +// Value represents a single value that can be read or written to/from +// Spanner. +message Value { + // Exactly one of the following fields will be present. + oneof value_type { + // If is_null is set, then this value is null. + bool is_null = 1; + + // Int type value. It's used for all integer number types, like int32 and + // int64. + int64 int_value = 2; + + // Bool type value. + bool bool_value = 3; + + // Double type value. It's used for all float point types, like float and + // double. + double double_value = 4; + + // Bytes type value, stored in CORD. It's also used for PROTO type value. + bytes bytes_value = 5; + + // String type value, stored in CORD. + string string_value = 6; + + // Struct type value. It contains a ValueList representing the values in + // this struct. + ValueList struct_value = 7; + + // Timestamp type value. + google.protobuf.Timestamp timestamp_value = 8; + + // Date type value. Date is specified as a number of days since Unix epoch. + int32 date_days_value = 9; + + // If set, holds the sentinel value for the transaction CommitTimestamp. + bool is_commit_timestamp = 10; + + // Array type value. The underlying Valuelist should have values that have + // the same type. + ValueList array_value = 11; + } + + // Type of array element. Only set if value is an array. + optional google.spanner.v1.Type array_type = 12; +} + +// KeyRange represents a range of rows in a table or index. +// +// A range has a start key and an end key. These keys can be open or +// closed, indicating if the range includes rows with that key. +// +// Keys are represented by "ValueList", where the ith value in the list +// corresponds to the ith component of the table or index primary key. +message KeyRange { + // Type controls whether "start" and "limit" are open or closed. By default, + // "start" is closed, and "limit" is open. + enum Type { + // "TYPE_UNSPECIFIED" is equivalent to "CLOSED_OPEN". + TYPE_UNSPECIFIED = 0; + + // [start,limit] + CLOSED_CLOSED = 1; + + // [start,limit) + CLOSED_OPEN = 2; + + // (start,limit] + OPEN_CLOSED = 3; + + // (start,limit) + OPEN_OPEN = 4; + } + + // "start" and "limit" must have the same number of key parts, + // though they may name only a prefix of the table or index key. + // The start key of this KeyRange. + ValueList start = 1; + + // The end key of this KeyRange. + ValueList limit = 2; + + // "start" and "limit" type for this KeyRange. + optional Type type = 3; +} + +// KeySet defines a collection of Spanner keys and/or key ranges. All +// the keys are expected to be in the same table. The keys need not be +// sorted in any particular way. +message KeySet { + // A list of specific keys. Entries in "keys" should have exactly as + // many elements as there are columns in the primary or index key + // with which this "KeySet" is used. + repeated ValueList point = 1; + + // A list of key ranges. + repeated KeyRange range = 2; + + // For convenience "all" can be set to "true" to indicate that this + // "KeySet" matches all keys in the table or index. Note that any keys + // specified in "keys" or "ranges" are only yielded once. + bool all = 3; +} + +// List of values. +message ValueList { + // Values contained in this ValueList. + repeated Value value = 1; +} + +// A single mutation request. +message MutationAction { + // Arguments to Insert, InsertOrUpdate, and Replace operations. + message InsertArgs { + // The names of the columns to be written. + repeated string column = 1; + + // Type information for the "values" entries below. + repeated google.spanner.v1.Type type = 2; + + // The values to be written. + repeated ValueList values = 3; + } + + // Arguments to Update. + message UpdateArgs { + // The columns to be updated. Identical to InsertArgs.column. + repeated string column = 1; + + // Type information for "values". Identical to InsertArgs.type. + repeated google.spanner.v1.Type type = 2; + + // The values to be updated. Identical to InsertArgs.values. + repeated ValueList values = 3; + } + + // Mod represents the write action that will be perform to a table. Each mod + // will specify exactly one action, from insert, update, insert_or_update, + // replace and delete. + message Mod { + // The table to write. + string table = 1; + + // Exactly one of the remaining elements may be present. + // Insert new rows into "table". + InsertArgs insert = 2; + + // Update columns stored in existing rows of "table". + UpdateArgs update = 3; + + // Insert or update existing rows of "table". + InsertArgs insert_or_update = 4; + + // Replace existing rows of "table". + InsertArgs replace = 5; + + // Delete rows from "table". + KeySet delete_keys = 6; + } + + // Mods that contained in this mutation. + repeated Mod mod = 1; +} + +// WriteMutationAction defines an action of flushing the mutation so they +// are visible to subsequent operations in the transaction. +message WriteMutationsAction { + // The mutation to write. + MutationAction mutation = 1; +} + +// PartitionedUpdateAction defines an action to execute a partitioned DML +// which runs different partitions in parallel. +message PartitionedUpdateAction { + message ExecutePartitionedUpdateOptions { + // RPC Priority + optional google.spanner.v1.RequestOptions.Priority rpc_priority = 1; + + // Transaction tag + optional string tag = 2; + } + + // Options for partitioned update. + optional ExecutePartitionedUpdateOptions options = 1; + + // Partitioned dml query. + QueryAction update = 2; +} + +// StartTransactionAction defines an action of initializing a transaction. +message StartTransactionAction { + // Concurrency is for read-only transactions and must be omitted for + // read-write transactions. + optional Concurrency concurrency = 1; + + // Metadata about tables and columns that will be involved in this + // transaction. It is to convert values of key parts correctly. + repeated TableMetadata table = 2; + + // Transaction_seed contains workid and op pair for this transaction, used for + // testing. + string transaction_seed = 3; + + // Execution options (e.g., whether transaction is opaque, optimistic). + optional TransactionExecutionOptions execution_options = 4; +} + +// Concurrency for read-only transactions. +message Concurrency { + // Concurrency mode set for read-only transactions, exactly one mode below + // should be set. + oneof concurrency_mode { + // Indicates a read at a consistent timestamp that is specified relative to + // now. That is, if the caller has specified an exact staleness of s + // seconds, we will read at now - s. + double staleness_seconds = 1; + + // Indicates a boundedly stale read that reads at a timestamp >= T. + int64 min_read_timestamp_micros = 2; + + // Indicates a boundedly stale read that is at most N seconds stale. + double max_staleness_seconds = 3; + + // Indicates a read at a consistent timestamp. + int64 exact_timestamp_micros = 4; + + // Indicates a strong read, must only be set to true, or unset. + bool strong = 5; + + // Indicates a batch read, must only be set to true, or unset. + bool batch = 6; + } + + // True if exact_timestamp_micros is set, and the chosen timestamp is that of + // a snapshot epoch. + bool snapshot_epoch_read = 7; + + // If set, this is a snapshot epoch read constrained to read only the + // specified log scope root table, and its children. Will not be set for full + // database epochs. + string snapshot_epoch_root_table = 8; + + // Set only when batch is true. + int64 batch_read_timestamp_micros = 9; +} + +// TableMetadata contains metadata of a single table. +message TableMetadata { + // Table name. + string name = 1; + + // Columns, in the same order as in the schema. + repeated ColumnMetadata column = 2; + + // Keys, in order. Column name is currently not populated. + repeated ColumnMetadata key_column = 3; +} + +// ColumnMetadata represents metadata of a single column. +message ColumnMetadata { + // Column name. + string name = 1; + + // Column type. + google.spanner.v1.Type type = 2; +} + +// Options for executing the transaction. +message TransactionExecutionOptions { + // Whether optimistic concurrency should be used to execute this transaction. + bool optimistic = 1; +} + +// FinishTransactionAction defines an action of finishing a transaction. +message FinishTransactionAction { + // Mode indicates how the transaction should be finished. + enum Mode { + // "MODE_UNSPECIFIED" is equivalent to "COMMIT". + MODE_UNSPECIFIED = 0; + + // Commit the transaction. + COMMIT = 1; + + // Drop the transaction without committing it. + ABANDON = 2; + } + + // Defines how exactly the transaction should be completed, e.g. with + // commit or abortion. + Mode mode = 1; +} + +// AdminAction defines all the cloud spanner admin actions, including +// instance/database admin ops, backup ops and operation actions. +message AdminAction { + // Exactly one of the actions below will be performed in AdminAction. + oneof action { + // Action that creates a user instance config. + CreateUserInstanceConfigAction create_user_instance_config = 1; + + // Action that updates a user instance config. + UpdateUserInstanceConfigAction update_user_instance_config = 2; + + // Action that deletes a user instance config. + DeleteUserInstanceConfigAction delete_user_instance_config = 3; + + // Action that gets a user instance config. + GetCloudInstanceConfigAction get_cloud_instance_config = 4; + + // Action that lists user instance configs. + ListCloudInstanceConfigsAction list_instance_configs = 5; + + // Action that creates a Cloud Spanner instance. + CreateCloudInstanceAction create_cloud_instance = 6; + + // Action that updates a Cloud Spanner instance. + UpdateCloudInstanceAction update_cloud_instance = 7; + + // Action that deletes a Cloud Spanner instance. + DeleteCloudInstanceAction delete_cloud_instance = 8; + + // Action that lists Cloud Spanner instances. + ListCloudInstancesAction list_cloud_instances = 9; + + // Action that retrieves a Cloud Spanner instance. + GetCloudInstanceAction get_cloud_instance = 10; + + // Action that creates a Cloud Spanner database. + CreateCloudDatabaseAction create_cloud_database = 11; + + // Action that updates the schema of a Cloud Spanner database. + UpdateCloudDatabaseDdlAction update_cloud_database_ddl = 12; + + // Action that updates the schema of a Cloud Spanner database. + UpdateCloudDatabaseAction update_cloud_database = 27; + + // Action that drops a Cloud Spanner database. + DropCloudDatabaseAction drop_cloud_database = 13; + + // Action that lists Cloud Spanner databases. + ListCloudDatabasesAction list_cloud_databases = 14; + + // Action that lists Cloud Spanner database operations. + ListCloudDatabaseOperationsAction list_cloud_database_operations = 15; + + // Action that restores a Cloud Spanner database from a backup. + RestoreCloudDatabaseAction restore_cloud_database = 16; + + // Action that gets a Cloud Spanner database. + GetCloudDatabaseAction get_cloud_database = 17; + + // Action that creates a Cloud Spanner database backup. + CreateCloudBackupAction create_cloud_backup = 18; + + // Action that copies a Cloud Spanner database backup. + CopyCloudBackupAction copy_cloud_backup = 19; + + // Action that gets a Cloud Spanner database backup. + GetCloudBackupAction get_cloud_backup = 20; + + // Action that updates a Cloud Spanner database backup. + UpdateCloudBackupAction update_cloud_backup = 21; + + // Action that deletes a Cloud Spanner database backup. + DeleteCloudBackupAction delete_cloud_backup = 22; + + // Action that lists Cloud Spanner database backups. + ListCloudBackupsAction list_cloud_backups = 23; + + // Action that lists Cloud Spanner database backup operations. + ListCloudBackupOperationsAction list_cloud_backup_operations = 24; + + // Action that gets an operation. + GetOperationAction get_operation = 25; + + // Action that cancels an operation. + CancelOperationAction cancel_operation = 26; + + // Action that reconfigures a Cloud Spanner database. + ReconfigureCloudDatabaseAction reconfigure_cloud_database = 28; + } +} + +// Action that creates a user instance config. +message CreateUserInstanceConfigAction { + // User instance config ID (not path), e.g. "custom-config". + string user_config_id = 1; + + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 2; + + // Base config ID, e.g. "test-config". + string base_config_id = 3; + + // Replicas that should be included in the user config. + repeated google.spanner.admin.instance.v1.ReplicaInfo replicas = 4; +} + +// Action that updates a user instance config. +message UpdateUserInstanceConfigAction { + // User instance config ID (not path), e.g. "custom-config". + string user_config_id = 1; + + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 2; + + // The descriptive name for this instance config as it appears in UIs. + optional string display_name = 3; + + // labels. + map labels = 4; +} + +// Action that gets a user instance config. +message GetCloudInstanceConfigAction { + // Instance config ID (not path), e.g. "custom-config". + string instance_config_id = 1; + + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 2; +} + +// Action that deletes a user instance configs. +message DeleteUserInstanceConfigAction { + // User instance config ID (not path), e.g. "custom-config". + string user_config_id = 1; + + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 2; +} + +// Action that lists user instance configs. +message ListCloudInstanceConfigsAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Number of instance configs to be returned in the response. If 0 or + // less, defaults to the server's maximum allowed page size. + optional int32 page_size = 2; + + // If non-empty, "page_token" should contain a next_page_token + // from a previous ListInstanceConfigsResponse to the same "parent". + optional string page_token = 3; +} + +// Action that creates a Cloud Spanner instance. +message CreateCloudInstanceAction { + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 1; + + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 2; + + // Instance config ID, e.g. "test-config". + string instance_config_id = 3; + + // Number of nodes (processing_units should not be set or set to 0 if used). + optional int32 node_count = 4; + + // Number of processing units (node_count should be set to 0 if used). + optional int32 processing_units = 6; + + // The autoscaling config for this instance. If non-empty, an autoscaling + // instance will be created (processing_units and node_count should be set to + // 0 if used). + optional google.spanner.admin.instance.v1.AutoscalingConfig + autoscaling_config = 7; + + // labels. + map labels = 5; +} + +// Action that updates a Cloud Spanner instance. +message UpdateCloudInstanceAction { + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 1; + + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 2; + + // The descriptive name for this instance as it appears in UIs. + // Must be unique per project and between 4 and 30 characters in length. + optional string display_name = 3; + + // The number of nodes allocated to this instance. At most one of either + // node_count or processing_units should be present in the message. + optional int32 node_count = 4; + + // The number of processing units allocated to this instance. At most one of + // processing_units or node_count should be present in the message. + optional int32 processing_units = 5; + + // The autoscaling config for this instance. If non-empty, this instance is + // using autoscaling (processing_units and node_count should be set to + // 0 if used). + optional google.spanner.admin.instance.v1.AutoscalingConfig + autoscaling_config = 7; + + // labels. + map labels = 6; +} + +// Action that deletes a Cloud Spanner instance. +message DeleteCloudInstanceAction { + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 1; + + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 2; +} + +// Action that creates a Cloud Spanner database. +message CreateCloudDatabaseAction { + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 1; + + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 2; + + // Cloud database ID (not full path), e.g. "db0". + string database_id = 3; + + // SDL statements to apply to the new database. + repeated string sdl_statement = 4; + + // The KMS key used to encrypt the database to be created if the database + // should be CMEK protected. + google.spanner.admin.database.v1.EncryptionConfig encryption_config = 5; + + // Optional SQL dialect (GOOGLESQL or POSTGRESQL). Default: GOOGLESQL. + optional string dialect = 6; + + optional bytes proto_descriptors = 7; +} + +// Action that updates the schema of a Cloud Spanner database. +message UpdateCloudDatabaseDdlAction { + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 1; + + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 2; + + // Cloud database ID (not full path), e.g. "db0". + string database_id = 3; + + // SDL statements to apply to the database. + repeated string sdl_statement = 4; + + // Op ID can be used to track progress of the update. If set, it must be + // unique per database. If not set, Cloud Spanner will generate operation ID + // automatically. + string operation_id = 5; + + optional bytes proto_descriptors = 6; +} + +// Action that updates a Cloud Spanner database. +message UpdateCloudDatabaseAction { + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 1; + + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 2; + + // Cloud database name (not full path), e.g. "db0". + string database_name = 3; + + // Updated value of enable_drop_protection, this is the only field that has + // supported to be updated. + bool enable_drop_protection = 4; +} + +// Action that drops a Cloud Spanner database. +message DropCloudDatabaseAction { + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 1; + + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 2; + + // Cloud database ID (not full path), e.g. "db0". + string database_id = 3; +} + +// Action that reconfigures a Cloud Spanner database. +message ReconfigureCloudDatabaseAction { + // The fully qualified uri of the database to be reconfigured. + optional string database_uri = 1; + + // The locations of the serving regions, e.g. "asia-south1". + repeated string serving_locations = 2; +} + +// Action that lists Cloud Spanner databases. +message ListCloudDatabasesAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Cloud instance ID (not path) to list databases from, e.g. "test-instance". + string instance_id = 2; + + // Number of databases to be returned in the response. If 0 or + // less, defaults to the server's maximum allowed page size. + int32 page_size = 3; + + // If non-empty, "page_token" should contain a next_page_token + // from a previous ListDatabasesResponse to the same "parent" + // and with the same "filter". + string page_token = 4; +} + +// Action that lists Cloud Spanner databases. +message ListCloudInstancesAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // A filter expression that filters what operations are returned in the + // response. + // The expression must specify the field name, a comparison operator, + // and the value that you want to use for filtering. + // Refer spanner_instance_admin.proto.ListInstancesRequest for + // detail. + optional string filter = 2; + + // Number of instances to be returned in the response. If 0 or + // less, defaults to the server's maximum allowed page size. + optional int32 page_size = 3; + + // If non-empty, "page_token" should contain a next_page_token + // from a previous ListInstancesResponse to the same "parent" + // and with the same "filter". + optional string page_token = 4; +} + +// Action that retrieves a Cloud Spanner instance. +message GetCloudInstanceAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Cloud instance ID (not path) to retrieve the instance from, + // e.g. "test-instance". + string instance_id = 2; +} + +// Action that lists Cloud Spanner database operations. +message ListCloudDatabaseOperationsAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Cloud instance ID (not path) to list database operations from, + // e.g. "test-instance". + string instance_id = 2; + + // A filter expression that filters what operations are returned in the + // response. + // The expression must specify the field name, a comparison operator, + // and the value that you want to use for filtering. + // Refer spanner_database_admin.proto.ListDatabaseOperationsRequest for + // detail. + string filter = 3; + + // Number of databases to be returned in the response. If 0 or + // less, defaults to the server's maximum allowed page size. + int32 page_size = 4; + + // If non-empty, "page_token" should contain a next_page_token + // from a previous ListDatabaseOperationsResponse to the same "parent" + // and with the same "filter". + string page_token = 5; +} + +// Action that restores a Cloud Spanner database from a backup. +message RestoreCloudDatabaseAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Cloud instance ID (not path) containing the backup, e.g. "backup-instance". + string backup_instance_id = 2; + + // The id of the backup from which to restore, e.g. "test-backup". + string backup_id = 3; + + // Cloud instance ID (not path) containing the database, e.g. + // "database-instance". + string database_instance_id = 4; + + // The id of the database to create and restore to, e.g. "db0". Note that this + // database must not already exist. + string database_id = 5; +} + +// Action that gets a Cloud Spanner database. +message GetCloudDatabaseAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 2; + + // The id of the database to get, e.g. "db0". + string database_id = 3; +} + +// Action that creates a Cloud Spanner database backup. +message CreateCloudBackupAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 2; + + // The id of the backup to be created, e.g. "test-backup". + string backup_id = 3; + + // The id of the database from which this backup was + // created, e.g. "db0". Note that this needs to be in the + // same instance as the backup. + string database_id = 4; + + // Output only. The expiration time of the backup, which must be at least 6 + // hours and at most 366 days from the time the request is received. + google.protobuf.Timestamp expire_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The version time of the backup, which must be within the time range of + // [earliest_version_time, NOW], where earliest_version_time is retrieved by + // cloud spanner frontend API (See details: go/cs-pitr-lite-design). + optional google.protobuf.Timestamp version_time = 6; +} + +// Action that copies a Cloud Spanner database backup. +message CopyCloudBackupAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 2; + + // The id of the backup to be created, e.g. "test-backup". + string backup_id = 3; + + // The fully qualified uri of the source backup from which this + // backup was copied. eg. + // "projects//instances//backups/". + string source_backup = 4; + + // Output only. The expiration time of the backup, which must be at least 6 + // hours and at most 366 days from the time the request is received. + google.protobuf.Timestamp expire_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Action that gets a Cloud Spanner database backup. +message GetCloudBackupAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 2; + + // The id of the backup to get, e.g. "test-backup". + string backup_id = 3; +} + +// Action that updates a Cloud Spanner database backup. +message UpdateCloudBackupAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 2; + + // The id of the backup to update, e.g. "test-backup". + string backup_id = 3; + + // Output only. Updated value of expire_time, this is the only field + // that supported to be updated. + google.protobuf.Timestamp expire_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Action that deletes a Cloud Spanner database backup. +message DeleteCloudBackupAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Cloud instance ID (not path), e.g. "test-instance". + string instance_id = 2; + + // The id of the backup to delete, e.g. "test-backup". + string backup_id = 3; +} + +// Action that lists Cloud Spanner database backups. +message ListCloudBackupsAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Cloud instance ID (not path) to list backups from, e.g. "test-instance". + string instance_id = 2; + + // A filter expression that filters backups listed in the response. + // The expression must specify the field name, a comparison operator, + // and the value that you want to use for filtering. + // Refer backup.proto.ListBackupsRequest for detail. + string filter = 3; + + // Number of backups to be returned in the response. If 0 or + // less, defaults to the server's maximum allowed page size. + int32 page_size = 4; + + // If non-empty, "page_token" should contain a next_page_token + // from a previous ListBackupsResponse to the same "parent" + // and with the same "filter". + string page_token = 5; +} + +// Action that lists Cloud Spanner database backup operations. +message ListCloudBackupOperationsAction { + // Cloud project ID, e.g. "spanner-cloud-systest". + string project_id = 1; + + // Cloud instance ID (not path) to list backup operations from, + // e.g. "test-instance". + string instance_id = 2; + + // A filter expression that filters what operations are returned in the + // response. + // The expression must specify the field name, a comparison operator, + // and the value that you want to use for filtering. + // Refer backup.proto.ListBackupOperationsRequest for detail. + string filter = 3; + + // Number of backups to be returned in the response. If 0 or + // less, defaults to the server's maximum allowed page size. + int32 page_size = 4; + + // If non-empty, "page_token" should contain a next_page_token + // from a previous ListBackupOperationsResponse to the same "parent" + // and with the same "filter". + string page_token = 5; +} + +// Action that gets an operation. +message GetOperationAction { + // The name of the operation resource. + string operation = 1; +} + +// Action that cancels an operation. +message CancelOperationAction { + // The name of the operation resource to be cancelled. + string operation = 1; +} + +// Starts a batch read-only transaction in executor. Successful outcomes of this +// action will contain batch_txn_id--the identificator that can be used to start +// the same transaction in other Executors to parallelize partition processing. +// +// Example of a batch read flow: +// 1. Start batch transaction with a timestamp (StartBatchTransactionAction) +// 2. Generate database partitions for a read or query +// (GenerateDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction) +// 3. Call ExecutePartitionAction for some or all partitions, process rows +// 4. Clean up the transaction (CloseBatchTransactionAction). +// +// More sophisticated example, with parallel processing: +// 1. Start batch transaction with a timestamp (StartBatchTransactionAction), +// note the returned BatchTransactionId +// 2. Generate database partitions for a read or query +// (GenerateDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction) +// 3. Distribute the partitions over a pool of workers, along with the +// transaction ID. +// +// In each worker: +// 4-1. StartBatchTransactionAction with the given transaction ID +// 4-2. ExecutePartitionAction for each partition it got, process read results +// 4-3. Close (not cleanup) the transaction (CloseBatchTransactionAction). +// +// When all workers are done: +// 5. Cleanup the transaction (CloseBatchTransactionAction). This can be done +// either by the last worker to finish the job, or by the main Executor that +// initialized this transaction in the first place. It is also possible to clean +// it up with a brand new Executor -- just execute StartBatchTransactionAction +// with the ID, then clean it up right away. +// +// Cleaning up is optional, but recommended. +message StartBatchTransactionAction { + // To start a new transaction, specify an exact timestamp. Alternatively, an + // existing batch transaction ID can be used. Either one of two must be + // set. + oneof param { + // The exact timestamp to start the batch transaction. + google.protobuf.Timestamp batch_txn_time = 1; + + // ID of a batch read-only transaction. It can be used to start the same + // batch transaction on multiple executors and parallelize partition + // processing. + bytes tid = 2; + } + + // Database role to assume while performing this action. Setting the + // database_role will enforce additional role-based access checks on this + // action. + string cloud_database_role = 3; +} + +// Closes or cleans up the currently opened batch read-only transaction. +// +// Once a transaction is closed, the Executor can be disposed of or used to +// start start another transaction. Closing a batch transaction in one Executor +// doesn't affect the transaction's state in other Executors that also read from +// it. +// +// When a transaction is cleaned up, it becomes globally invalid. Cleaning up is +// optional, but recommended. +message CloseBatchTransactionAction { + // Indicates whether the transaction needs to be cleaned up. + bool cleanup = 1; +} + +// Generate database partitions for the given read. Successful outcomes will +// contain database partitions in the db_partition field. +message GenerateDbPartitionsForReadAction { + // Read to generate partitions for. + ReadAction read = 1; + + // Metadata related to the tables involved in the read. + repeated TableMetadata table = 2; + + // Desired size of data in each partition. Spanner doesn't guarantee to + // respect this value. + optional int64 desired_bytes_per_partition = 3; + + // If set, the desired max number of partitions. Spanner doesn't guarantee to + // respect this value. + optional int64 max_partition_count = 4; +} + +// Generate database partitions for the given query. Successful outcomes will +// contain database partitions in the db_partition field. +message GenerateDbPartitionsForQueryAction { + // Query to generate partitions for. + QueryAction query = 1; + + // Desired size of data in each partition. Spanner doesn't guarantee to + // respect this value. + optional int64 desired_bytes_per_partition = 2; +} + +// Identifies a database partition generated for a particular read or query. To +// read rows from the partition, use ExecutePartitionAction. +message BatchPartition { + // Serialized Partition instance. + bytes partition = 1; + + // The partition token decrypted from partition. + bytes partition_token = 2; + + // Table name is set iff the partition was generated for a read (as opposed to + // a query). + optional string table = 3; + + // Index name if the partition was generated for an index read. + optional string index = 4; +} + +// Performs a read or query for the given partitions. This action must be +// executed in the context of the same transaction that was used to generate +// given partitions. +message ExecutePartitionAction { + // Batch partition to execute on. + BatchPartition partition = 1; +} + +// Execute a change stream TVF query. +message ExecuteChangeStreamQuery { + // Name for this change stream. + string name = 1; + + // Specifies that records with commit_timestamp greater than or equal to + // start_time should be returned. + google.protobuf.Timestamp start_time = 2; + + // Specifies that records with commit_timestamp less than or equal to + // end_time should be returned. + optional google.protobuf.Timestamp end_time = 3; + + // Specifies which change stream partition to query, based on the content of + // child partitions records. + optional string partition_token = 4; + + // Read options for this change stream query. + repeated string read_options = 5; + + // Determines how frequently a heartbeat ChangeRecord will be returned in case + // there are no transactions committed in this partition, in milliseconds. + optional int32 heartbeat_milliseconds = 6; + + // Deadline for this change stream query, in seconds. + optional int64 deadline_seconds = 7; + + // Database role to assume while performing this action. This should only be + // set for cloud requests. Setting the database role will enforce additional + // role-based access checks on this action. + optional string cloud_database_role = 8; +} + +// SpannerActionOutcome defines a result of execution of a single SpannerAction. +message SpannerActionOutcome { + // If an outcome is split into multiple parts, status will be set only in the + // last part. + optional google.rpc.Status status = 1; + + // Transaction timestamp. It must be set for successful committed actions. + optional google.protobuf.Timestamp commit_time = 2; + + // Result of a ReadAction. This field must be set for ReadActions even if + // no rows were read. + optional ReadResult read_result = 3; + + // Result of a Query. This field must be set for Queries even if no rows were + // read. + optional QueryResult query_result = 4; + + // This bit indicates that Spanner has restarted the current transaction. It + // means that the client should replay all the reads and writes. + // Setting it to true is only valid in the context of a read-write + // transaction, as an outcome of a committing FinishTransactionAction. + optional bool transaction_restarted = 5; + + // In successful StartBatchTransactionAction outcomes, this contains the ID of + // the transaction. + optional bytes batch_txn_id = 6; + + // Generated database partitions (result of a + // GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction). + repeated BatchPartition db_partition = 7; + + // Result of admin related actions. + optional AdminResult admin_result = 8; + + // Stores rows modified by query in single DML or batch DML action. + // In case of batch DML action, stores 0 as row count of errored DML query. + repeated int64 dml_rows_modified = 9; + + // Change stream records returned by a change stream query. + repeated ChangeStreamRecord change_stream_records = 10; +} + +// AdminResult contains admin action results, for database/backup/operation. +message AdminResult { + // Results of cloud backup related actions. + CloudBackupResponse backup_response = 1; + + // Results of operation related actions. + OperationResponse operation_response = 2; + + // Results of database related actions. + CloudDatabaseResponse database_response = 3; + + // Results of instance related actions. + CloudInstanceResponse instance_response = 4; + + // Results of instance config related actions. + CloudInstanceConfigResponse instance_config_response = 5; +} + +// CloudBackupResponse contains results returned by cloud backup related +// actions. +message CloudBackupResponse { + // List of backups returned by ListCloudBackupsAction. + repeated google.spanner.admin.database.v1.Backup listed_backups = 1; + + // List of operations returned by ListCloudBackupOperationsAction. + repeated google.longrunning.Operation listed_backup_operations = 2; + + // "next_page_token" can be sent in a subsequent list action + // to fetch more of the matching data. + string next_page_token = 3; + + // Backup returned by GetCloudBackupAction/UpdateCloudBackupAction. + google.spanner.admin.database.v1.Backup backup = 4; +} + +// OperationResponse contains results returned by operation related actions. +message OperationResponse { + // List of operations returned by ListOperationsAction. + repeated google.longrunning.Operation listed_operations = 1; + + // "next_page_token" can be sent in a subsequent list action + // to fetch more of the matching data. + string next_page_token = 2; + + // Operation returned by GetOperationAction. + google.longrunning.Operation operation = 3; +} + +// CloudInstanceResponse contains results returned by cloud instance related +// actions. +message CloudInstanceResponse { + // List of instances returned by ListCloudInstancesAction. + repeated google.spanner.admin.instance.v1.Instance listed_instances = 1; + + // "next_page_token" can be sent in a subsequent list action + // to fetch more of the matching data. + string next_page_token = 2; + + // Instance returned by GetCloudInstanceAction + google.spanner.admin.instance.v1.Instance instance = 3; +} + +// CloudInstanceConfigResponse contains results returned by cloud instance +// config related actions. +message CloudInstanceConfigResponse { + // List of instance configs returned by ListCloudInstanceConfigsAction. + repeated google.spanner.admin.instance.v1.InstanceConfig + listed_instance_configs = 1; + + // "next_page_token" can be sent in a subsequent list action + // to fetch more of the matching data. + string next_page_token = 2; + + // Instance config returned by GetCloudInstanceConfigAction. + google.spanner.admin.instance.v1.InstanceConfig instance_config = 3; +} + +// CloudDatabaseResponse contains results returned by cloud database related +// actions. +message CloudDatabaseResponse { + // List of databases returned by ListCloudDatabasesAction. + repeated google.spanner.admin.database.v1.Database listed_databases = 1; + + // List of operations returned by ListCloudDatabaseOperationsAction. + repeated google.longrunning.Operation listed_database_operations = 2; + + // "next_page_token" can be sent in a subsequent list action + // to fetch more of the matching data. + string next_page_token = 3; + + // Database returned by GetCloudDatabaseAction + google.spanner.admin.database.v1.Database database = 4; +} + +// ReadResult contains rows read. +message ReadResult { + // Table name. + string table = 1; + + // Index name, if read from an index. + optional string index = 2; + + // Request index (multiread only). + optional int32 request_index = 3; + + // Rows read. Each row is a struct with multiple fields, one for each column + // in read result. All rows have the same type. + repeated ValueList row = 4; + + // The type of rows read. It must be set if at least one row was read. + optional google.spanner.v1.StructType row_type = 5; +} + +// QueryResult contains result of a Query. +message QueryResult { + // Rows read. Each row is a struct with multiple fields, one for each column + // in read result. All rows have the same type. + repeated ValueList row = 1; + + // The type of rows read. It must be set if at least one row was read. + optional google.spanner.v1.StructType row_type = 2; +} + +// Raw ChangeStream records. +// Encodes one of: DataChangeRecord, HeartbeatRecord, ChildPartitionsRecord +// returned from the ChangeStream API. +message ChangeStreamRecord { + // Record represents one type of the change stream record. + oneof record { + // Data change record. + DataChangeRecord data_change = 1; + + // Child partitions record. + ChildPartitionsRecord child_partition = 2; + + // Heartbeat record. + HeartbeatRecord heartbeat = 3; + } +} + +// ChangeStream data change record. +message DataChangeRecord { + // Column types. + message ColumnType { + // Column name. + string name = 1; + + // Column type in JSON. + string type = 2; + + // Whether the column is a primary key column. + bool is_primary_key = 3; + + // The position of the column as defined in the schema. + int64 ordinal_position = 4; + } + + // Describes the changes that were made. + message Mod { + // The primary key values in JSON. + string keys = 1; + + // The new values of the changed columns in JSON. Only contain the non-key + // columns. + string new_values = 2; + + // The old values of the changed columns in JSON. Only contain the non-key + // columns. + string old_values = 3; + } + + // The timestamp in which the change was committed. + google.protobuf.Timestamp commit_time = 1; + + // The sequence number for the record within the transaction. + string record_sequence = 2; + + // A globally unique string that represents the transaction in which the + // change was committed. + string transaction_id = 3; + + // Indicates whether this is the last record for a transaction in the current + // partition. + bool is_last_record = 4; + + // Name of the table affected by the change. + string table = 5; + + // Column types defined in the schema. + repeated ColumnType column_types = 6; + + // Changes made in the transaction. + repeated Mod mods = 7; + + // Describes the type of change. One of INSERT, UPDATE or DELETE. + string mod_type = 8; + + // One of value capture type: NEW_VALUES, OLD_VALUES, OLD_AND_NEW_VALUES. + string value_capture_type = 9; + + // Number of records in transactions. + int64 record_count = 10; + + // Number of partitions in transactions. + int64 partition_count = 11; + + // Transaction tag info. + string transaction_tag = 12; + + // Whether the transaction is a system transactionn. + bool is_system_transaction = 13; +} + +// ChangeStream child partition record. +message ChildPartitionsRecord { + // A single child partition. + message ChildPartition { + // Partition token string used to identify the child partition in queries. + string token = 1; + + // Parent partition tokens of this child partition. + repeated string parent_partition_tokens = 2; + } + + // Data change records returned from child partitions in this child partitions + // record will have a commit timestamp greater than or equal to start_time. + google.protobuf.Timestamp start_time = 1; + + // A monotonically increasing sequence number that can be used to define the + // ordering of the child partitions record when there are multiple child + // partitions records returned with the same start_time in a particular + // partition. + string record_sequence = 2; + + // A set of child partitions and their associated information. + repeated ChildPartition child_partitions = 3; +} + +// ChangeStream heartbeat record. +message HeartbeatRecord { + // Timestamp for this heartbeat check. + google.protobuf.Timestamp heartbeat_time = 1; +} diff --git a/versions.txt b/versions.txt index e01a54509e7..ab4320c62b7 100644 --- a/versions.txt +++ b/versions.txt @@ -9,3 +9,5 @@ grpc-google-cloud-spanner-admin-instance-v1:6.55.0:6.55.1-SNAPSHOT grpc-google-cloud-spanner-admin-database-v1:6.55.0:6.55.1-SNAPSHOT google-cloud-spanner:6.55.0:6.55.1-SNAPSHOT google-cloud-spanner-executor:6.55.0:6.55.1-SNAPSHOT +proto-google-cloud-spanner-executor-v1:6.55.0:6.55.1-SNAPSHOT +grpc-google-cloud-spanner-executor-v1:6.55.0:6.55.1-SNAPSHOT